
This section is just a quick hack. The commands will change in the future!
Reports TRUE if a Finch is detected.
FINCH?
FINCH? reports TRUE if a Finch is detected.
FINCH? Result: TRUE
Controls the Finch's buzzer.
FINCH.BUZZ frequency duration (FINCH.BUZZ frequency) (FINCH.BUZZ)
FINCH.BUZZ sounds the Finch's buzzer. Its first input is the frequency in Hertz, and its second input is the duration in milliseconds. If the duration is omitted, the sound goes on forever until (FINCH.BUZZ) is issues, which turns off the sound.
; Sound the middle A note for a second FINCH.BUZZ 440 1000
Closes the connection to the Finch.
FINCH.CLOSE
FINCH.CLOSE closes the connection to the Finch.
FINCH.CLOSE
Controls the Finch's nose LED.
FINCH.LED color duration (FINCH.LED color) (FINCH.LED)
FINCH.LED turns the Finch's nose LED on and sets its color to the given value. It turns off the LED after the number of milliseconds supplied as its second input expired. If the duration is omitted, the LED stays on. If FINCH.LED is used without inputs, the Finch's nose LED is turned off.
; Set the LED to red for a second FINCH.LED "RED 1000 ; Set it to blue and leave it on (FINCH.LED "BLUE) ; turn it off (FINCH.LED)
Controls the Finch's motors.
FINCH.MOTORS left right duration (FINCH.MOTORS left right) (FINCH.MOTORS left left) (FINCH.MOTORS)
FINCH.MOTORS controls the Finch's motors. The first two inputs control the speed and direction o the left and right wheels. Possible values are -1 (full power backwards) to 1 (full power forward). A value of 0 (which Logo assumes if a value if not supplied) turns the motor off.FINCH.MOTORS turns off the motors after the number of milliseconds supplied as its third input expired. If the duration is omitted, the motors stay on. If FINCH.MOTORS is used without inputs, the Finch's motors are turned off.
; Move back at half speed for a second FINCH.MOTORS -0.5 -0.5 1000 ; turn the Finch right for half a second FINCH.MOTORS 0.5 -0.5 500
Reports the value of Finch's sensor array.
FINCH.SENSORS
FINCH.SENSORS reports the values of Finch's sensor array as a four element list. The first value is a three-element list containing the values of Finch's accelerometers (X, Y and Z, values between -1 and 1). The second element is a two-element list of Finch's left and right lisght sensors (a value between 0 and 1). The third element is a two-element list containing the value of the left and right obstacle sensors (either TRUE or FALSE), and the last element is the temperatore sensor in degrees Celsius.
FINCH.SENSORS Result: [[0.05 -0.05 1.08] [0.37 0.52] [FALSE FALSE] 22.08]