Component: Formula Flowcode (Mechatronics)
Author | Matrix Ltd |
Version | 1.2 |
Category | Mechatronics |
Contents
Formula Flowcode component
Examples
No additional examples
Downloadable macro reference
PlayNote
Outputs a single tone from the onboard speaker for the period specified
Parameters
- BYTE Note
- UINT Delay_ms
Return value
- This call does not return a value
LEDOn
Switches on a single LED on the front of the Formula Flowcode.
Parameters
- BYTE LED
Return value
- This call does not return a value
Stop
Stops both motors
Parameters
- This macro has no parameters
Return value
- This call does not return a value
LEDOff
Switches off a single LED on the front of the Formula Flowcode.
Parameters
- BYTE LED
Return value
- This call does not return a value
ReadMic
Reads the current audio signal level from the on-board microphone.
Parameters
- This macro has no parameters
Return value
ReadSwitch
Reads the value of one of the switches from the front of the Formula Flowcode.
Parameters
- BYTE Switch
Return value
SpinLeft
Spins the formula flowcode on the spot in an anticlockwise direction as seen from above.
Parameters
- BYTE Power
Return value
- This call does not return a value
Forward
Drives both motors of the formula flowcode forwards with the power specified.
Parameters
- BYTE Power
Return value
- This call does not return a value
ReadLineSensor
Returns the digital value from the line sensor specified.
Parameters
- BYTE Sensor
Return value
SpinRight
Spins the formula flowcode on the spot in a clockwise direction as seen from above.
Parameters
- BYTE Power
Return value
- This call does not return a value
CheckIR
Checks to see if a IR sensor is within the master threshold distance.
Parameters
- BYTE Sensor
Return value
ReadIRSensor
Reads the analogue value from the specified IR distance sensor.
Parameters
- BYTE Sensor
Return value
SetMotors
Sets the speed and direction of the Formula Flowcode motors.
Parameters
- INT Left_Power
- INT Right_Power
Return value
- This call does not return a value
Reverse
Drives both motors of the formula flowcode backwards with the power specified.
Parameters
- BYTE Power
Return value
- This call does not return a value
WaitForSwitch
Waits for the specified switch to be pressed.
Parameters
- BYTE Switch
Return value
- This call does not return a value
ReadLDR
Reads the current audio signal level from the on-board light sensor.
Parameters
- This macro has no parameters
Return value
WriteLEDs
Allows control of all 8-LEDs on the front of the Formula Flowcode.
Parameters
- BYTE LED_Byte
Return value
- This call does not return a value
Initialise
Starts up the formula flowcode PWM for motor control and performs the wait for button press
Parameters
- This macro has no parameters
Return value
- This call does not return a value
Simulation macro reference
This component does not contain any simulation macros
Property reference
Wait For Button
This property is of type True or false and can be referenced with the variable name wait_b4_start.
No additional information
IR Sensitivity
This property is of type Fixed list of ints and can be referenced with the variable name ret_type.
No additional information
Motor Balance (-100 - 100)
This property is of type Signed integer and can be referenced with the variable name balance.
No additional information
Left
This property is of type Signed integer and can be referenced with the variable name thresh_left.
No additional information
Front
This property is of type Signed integer and can be referenced with the variable name thresh_front.
No additional information
Right
This property is of type Signed integer and can be referenced with the variable name thresh_right.
No additional information
Sim Speed (1 - 100)
This property is of type Signed integer and can be referenced with the variable name sim_speed.
No additional information
Smooth Animation
This property is of type True or false and can be referenced with the variable name Animate_Style.
No additional information
Manual Redraw
This property is of type True or false and can be referenced with the variable name Redraw.
No additional information
Timer Interval (ms)
This property is of type Signed integer and can be referenced with the variable name timer_interval.
No additional information
Line Sensor Iterations
This property is of type Signed integer and can be referenced with the variable name LS_Count.
No additional information
Line Sensor Resolution
This property is of type Floating point and can be referenced with the variable name LS_Res.
No additional information
IR Sensor Iterations
This property is of type Signed integer and can be referenced with the variable name IR_Count.
No additional information
IR Sensor Resolution
This property is of type Floating point and can be referenced with the variable name IR_Res.
No additional information
Collision Method
This property is of type Fixed list of ints and can be referenced with the variable name collision_mode.
No additional information
Collision Group
This property is of type Panel object and can be referenced with the variable name collision_group.
No additional information