OS1 orientation sensor
| Block Code | Copy and Paste |
![]() |
use Libraries.Robots.BirdBrain.Finch Finch finch repeat until finch:GetButton("B") text fincho=finch:GetOrientation() output "Finch Orientation: " + fincho finch:Pause(2) end finch:Disconnect() |
OS2 Orientation Sensor with lights
| Block Code | Copy and Paste Code |
![]() |
use Libraries.Robots.BirdBrain.Finch Finch finch repeat until finch:GetButton("B") text fincho=finch:GetOrientation() output "Finch Orientation: " + fincho if fincho="Beak down" finch:SetBeak(0,100,0) elseif fincho="Beak up" finch:SetTail("All",100,0,0) elseif fincho="Level" finch:Output("Level") finch:Pause(1) elseif fincho=("Beak up") finch:SetTail(3,100,0,0) elseif fincho=("Upside down") finch:Output("X") repeat 12 times finch:SetTail("All",0,0,100) finch:SetBeak(0,0,100) finch:Pause(0.08) finch:StopAll() end elseif fincho=("Tilt left") finch:SetTail(1,0,100,100) elseif fincho=("Tilt right") finch:SetTail(4,100,50,0) elseif fincho=("In between") finch:Output("in") finch:SetTail("All",22,44,88) end finch:Pause(2) finch:StopAll() end finch:Disconnect() |

