Difference between revisions of "Component: Formula Flowcode (Robotics)"
Line 73: | Line 73: | ||
{{Fcfile|FF-Maze.fcfx|FF-Maze}} | {{Fcfile|FF-Maze.fcfx|FF-Maze}} | ||
[[File:Print3.jpg]] | [[File:Print3.jpg]] | ||
+ | |||
+ | |||
Line 78: | Line 80: | ||
==Macro reference== | ==Macro reference== | ||
+ | ===PlayNote=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 101: | Line 104: | ||
+ | ===LEDOn=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 119: | Line 123: | ||
+ | ===Stop=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 132: | Line 137: | ||
+ | ===LEDOff=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 150: | Line 156: | ||
+ | ===ReadMic=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 163: | Line 170: | ||
+ | ===ReadSwitch=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 181: | Line 189: | ||
+ | ===SpinLeft=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 199: | Line 208: | ||
+ | ===Forward=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 217: | Line 227: | ||
+ | ===ReadLineSensor=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 235: | Line 246: | ||
+ | ===SpinRight=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 253: | Line 265: | ||
+ | ===CheckIR=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 271: | Line 284: | ||
+ | ===ReadIRSensor=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 289: | Line 303: | ||
+ | ===SetMotors=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 312: | Line 327: | ||
+ | ===Reverse=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 330: | Line 346: | ||
+ | ===WaitForSwitch=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 348: | Line 365: | ||
+ | ===ReadLDR=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 361: | Line 379: | ||
+ | ===WriteLEDs=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 379: | Line 398: | ||
+ | ===Initialise=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- |
Revision as of 11:49, 3 February 2023
Author | Matrix Ltd |
Version | 2.0 |
Category | Robotics |
Contents
Formula Flowcode component
A component to allow all the features of the Formula Flowcode robot to be investigated. Fully simulated component which can interact with simulated objects on the panel as well as control the real hardware.
Component Source Code
Please click here to download the component source project: FC_Comp_Source_FormulaFlowcode.fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_FormulaFlowcode.fcfx
Detailed description
No detailed description exists yet for this component
Examples
Importing from v5
The Formula Flowcode component in Flowcode v6 has a new Initialise macro which will need to be added to your program before any other calls to the component are made.
Line Following
Line following example using the Formula Flowcode, works with objects on the simulation panel and on the real hardware.
FF-Line
Maze Solving
Wall following example using the Formula Flowcode, works with a randomly generated maze on the simulation panel and on the real hardware.
FF-Maze
Macro reference
PlayNote
![]() |
PlayNote |
Outputs a single tone from the onboard speaker for the period specified | |
![]() |
Note |
![]() |
Delay_ms |
![]() |
Return |
LEDOn
![]() |
LEDOn |
Switches on a single LED on the front of the Formula Flowcode. | |
![]() |
LED |
![]() |
Return |
Stop
![]() |
Stop |
Stops both motors | |
![]() |
Return |
LEDOff
![]() |
LEDOff |
Switches off a single LED on the front of the Formula Flowcode. | |
![]() |
LED |
![]() |
Return |
ReadMic
![]() |
ReadMic |
Reads the current audio signal level from the on-board microphone. | |
![]() |
Return |
ReadSwitch
![]() |
ReadSwitch |
Reads the value of one of the switches from the front of the Formula Flowcode. | |
![]() |
Switch |
![]() |
Return |
SpinLeft
![]() |
SpinLeft |
Spins the formula flowcode on the spot in an anticlockwise direction as seen from above. | |
![]() |
Power |
![]() |
Return |
Forward
![]() |
Forward |
Drives both motors of the formula flowcode forwards with the power specified. | |
![]() |
Power |
![]() |
Return |
ReadLineSensor
![]() |
ReadLineSensor |
Returns the digital value from the line sensor specified. | |
![]() |
Sensor |
![]() |
Return |
SpinRight
![]() |
SpinRight |
Spins the formula flowcode on the spot in a clockwise direction as seen from above. | |
![]() |
Power |
![]() |
Return |
CheckIR
![]() |
CheckIR |
Checks to see if a IR sensor is within the master threshold distance. | |
![]() |
Sensor |
![]() |
Return |
ReadIRSensor
![]() |
ReadIRSensor |
Reads the analogue value from the specified IR distance sensor. | |
![]() |
Sensor |
![]() |
Return |
SetMotors
![]() |
SetMotors |
Sets the speed and direction of the Formula Flowcode motors. | |
![]() |
Left_Power |
Valid Range = -255 to 255 | |
![]() |
Right_Power |
Valid Range = -255 to 255 | |
![]() |
Return |
Reverse
![]() |
Reverse |
Drives both motors of the formula flowcode backwards with the power specified. | |
![]() |
Power |
![]() |
Return |
WaitForSwitch
![]() |
WaitForSwitch |
Waits for the specified switch to be pressed. | |
![]() |
Switch |
![]() |
Return |
ReadLDR
![]() |
ReadLDR |
Reads the current audio signal level from the on-board light sensor. | |
![]() |
Return |
WriteLEDs
![]() |
WriteLEDs |
Allows control of all 8-LEDs on the front of the Formula Flowcode. | |
![]() |
LED_Byte |
![]() |
Return |
Initialise
![]() |
Initialise |
Starts up the formula flowcode PWM for motor control and performs the wait for button press | |
![]() |
Return |