Difference between revisions of "Component: Formula AllCode (RB4420) (Robotics)"
From Flowcode Help
Jump to navigationJump to search(2 intermediate revisions by the same user not shown) | |||
Line 14: | Line 14: | ||
==Formula AllCode component== | ==Formula AllCode component== | ||
A component to allow all the features of the Formula AllCode robot to be investigated. Fully simulated component which can interact with simulated objects on the panel as well as control the real hardware. | A component to allow all the features of the Formula AllCode robot to be investigated. Fully simulated component which can interact with simulated objects on the panel as well as control the real hardware. | ||
+ | |||
+ | ==Component Pack== | ||
+ | |||
+ | FREE | ||
==Detailed description== | ==Detailed description== | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
Line 24: | Line 34: | ||
==Examples== | ==Examples== | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
Line 148: | Line 164: | ||
|- | |- | ||
|- | |- | ||
− | | width="10%" align="center" | [[File:]] - | + | | width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT |
| width="90%" | Distance | | width="90%" | Distance | ||
|- | |- | ||
| colspan="2" | mm per encoder step. default = 0.32 | | colspan="2" | mm per encoder step. default = 0.32 | ||
|- | |- | ||
− | | width="10%" align="center" | [[File:]] - | + | | width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT |
| width="90%" | Angle | | width="90%" | Angle | ||
|- | |- | ||
Line 184: | Line 200: | ||
|- | |- | ||
|- | |- | ||
− | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:]] - | + | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-f32-icon.png]] - FLOAT |
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
|} | |} | ||
Line 703: | Line 719: | ||
|- | |- | ||
|- | |- | ||
− | | width="10%" align="center" | [[File:]] - | + | | width="10%" align="center" | [[File:Fc9-s16-icon.png]] - INT |
| width="90%" | Left | | width="90%" | Left | ||
|- | |- | ||
| colspan="2" | Valid Range = -100 to 100 | | colspan="2" | Valid Range = -100 to 100 | ||
|- | |- | ||
− | | width="10%" align="center" | [[File:]] - | + | | width="10%" align="center" | [[File:Fc9-s16-icon.png]] - INT |
| width="90%" | Right | | width="90%" | Right | ||
|- | |- | ||
Line 981: | Line 997: | ||
|- | |- | ||
| colspan="2" | Controls when the motor feedback is used. No - Speed control feedback is not used for SetMotors commands. Yes - Speed control feedback is used for the SetMotors commands. SetMotors commands include Forward, Backward, SpinLeft, SpinRight as well as SetMotors itself. Logo functions always use feedback. | | colspan="2" | Controls when the motor feedback is used. No - Speed control feedback is not used for SetMotors commands. Yes - Speed control feedback is used for the SetMotors commands. SetMotors commands include Forward, Backward, SpinLeft, SpinRight as well as SetMotors itself. Logo functions always use feedback. | ||
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]] | ||
+ | | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | IR Simulation | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | ||
+ | | width="90%" | IR Simulation Mode | ||
+ | |- | ||
+ | | colspan="2" | Controls how the IR sensors are modelled in simulation. Linear is the legacy mode and works as it has always done. Exponential attempts to provide a more accurate reading which is closed to response of the real world hardware, | ||
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]] | ||
+ | | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | IR Thresholds (CheckIR macro) | ||
+ | |- | ||
|- | |- | ||
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]] | | width="10%" align="center" | [[File:Fc9-type-21-icon.png]] | ||
Line 991: | Line 1,020: | ||
|- | |- | ||
| colspan="2" | | | colspan="2" | | ||
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]] | ||
+ | | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Simulation Properties | ||
+ | |- | ||
|- | |- | ||
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]] | | width="10%" align="center" | [[File:Fc9-type-21-icon.png]] | ||
Line 1,016: | Line 1,049: | ||
|- | |- | ||
| colspan="2" | Useful if you are creating add-ons to the robot which you want to be able to simulate. Point the property at the group containing the Formula Allcode and the additional mechanics. Otherwise leave blank to maintain the normal simulation functionality. | | colspan="2" | Useful if you are creating add-ons to the robot which you want to be able to simulate. Point the property at the group containing the Formula Allcode and the additional mechanics. Otherwise leave blank to maintain the normal simulation functionality. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
|} | |} |
Latest revision as of 17:20, 9 November 2022
Author | Matrix TSL |
Version | 1.3 |
Category | Robotics |
Contents
Formula AllCode component
A component to allow all the features of the Formula AllCode robot to be investigated. Fully simulated component which can interact with simulated objects on the panel as well as control the real hardware.
Component Pack
FREE
Detailed description
No detailed description exists yet for this component
Examples
Line Following
Line following example using the Formula AllCode, works with objects on the simulation panel and on the real hardware.
Simulation with the API component
An example showing how to use the API component to drive the robot in simulation.
Downloadable macro reference
![]() |
LEDOn |
Switches on a single LED on the front of the Formula Allcode. | |
![]() |
LED |
Which LED to switch on, range 0-7 | |
![]() |
Return |
![]() |
BluetoothTransmit |
Sends a byte via the Bluetooth data connection. | |
![]() |
Data |
![]() |
Return |
![]() |
Stop |
Stops both motors. | |
![]() |
Return |
![]() |
LEDOff |
Switches off a single LED on the front of the Formula Allcode. | |
![]() |
LED |
Which LED to switch on, range 0-7 | |
![]() |
Return |
![]() |
LEDWrite |
Allows control of all 8-LEDs on the front of the Formula Allcode. | |
![]() |
LED_Byte |
8-bit binary value to write to the 8 LEDs | |
![]() |
Return |
![]() |
BluetoothCheckConnection |
Checks the status of the Bluetooth connection. Returns 0 for not paired and 1 for paired. | |
![]() |
Return |
![]() |
ReadMic |
Reads the current audio signal level from the on-board microphone. Return value range: 0 to 4095 | |
![]() |
Return |
![]() |
AudioQueueLength |
Retreives the current length of valid data within the audio queue | |
![]() |
Return |
![]() |
AudioAddToBuffer |
Writes a value to the 16-bit audio output buffer. | |
![]() |
Data |
![]() |
Return |
![]() |
ReadSwitch |
Reads the value of one of the switches from the front of the Formula Allcode. | |
![]() |
Switch |
Which switch do we want to read 0=Left, 1=Right | |
![]() |
Return |
![]() |
SpinLeft |
Spins the formula flowcode on the spot in an anticlockwise direction as seen from above. | |
![]() |
Power |
Amount of power to use to drive motor. Range 0-100 | |
![]() |
Return |
![]() |
Forward |
Drives both motors of the formula flowcode forwards with the power specified. | |
![]() |
Power |
Amount of power to use to drive motor. Range 0-100 | |
![]() |
Return |
![]() |
LCDWriteByte |
![]() |
Data |
![]() |
X |
![]() |
Y |
![]() |
Return |
![]() |
BluetoothReceive |
Attempt to read a byte from the Bluetooth receive queue. | |
![]() |
Return |
![]() |
LCDDrawLine |
Draws a line on the LCD. | |
![]() |
X1 |
Range 0-127 | |
![]() |
Y1 |
Range 0-31 | |
![]() |
X2 |
Range 0-127 | |
![]() |
Y2 |
Range 0-31 | |
![]() |
Return |
![]() |
BluetoothQueueLength |
Reads the length of received Bluetooth data in bytes. | |
![]() |
Return |
![]() |
BluetoothTransmitString |
Sends a string via the Bluetooth data connection. | |
![]() |
Data |
![]() |
Return |
![]() |
LCDBacklight |
Controls the brighness of the LCD backlight | |
![]() |
Brightness |
Range: 0-100, 0=Off, 1=Min Brightness, 100=Max Brightness | |
![]() |
Return |
![]() |
AudioReadFromBuffer |
Allows the audio buffer to be used for other streaming data such as recording the mic. | |
![]() |
Return |
![]() |
SpinRight |
Spins the formula flowcode on the spot in a clockwise direction as seen from above. | |
![]() |
Power |
Amount of power to use to drive motor. Range 0-100 | |
![]() |
Return |
![]() |
LCDPlotPixel |
Allows a single pixel on the LCD to be set or cleared. | |
![]() |
X |
Sets the X coordinate - Range 0-127 | |
![]() |
Y |
Sets the Y coordinate - Range 0-31 | |
![]() |
Return |
![]() |
LCDSetBackgroundColour |
Sets the pixel colour to drive the LCD. Default colour is 1 where a set pixel is black and the background is white. | |
![]() |
Colour |
Range 0-1 : 0=White, 1=Black | |
![]() |
Return |
![]() |
SetMotors |
Sets the speed and direction of the Formula Allcode motors. | |
![]() |
Left |
Valid Range = -100 to 100 | |
![]() |
Right |
Valid Range = -100 to 100 | |
![]() |
Return |
![]() |
EncoderReset |
Resets the encoder counters to 0 | |
![]() |
Return |
![]() |
Reverse |
Drives both motors of the formula flowcode backwards with the power specified. | |
![]() |
Power |
Amount of power to use to drive motor. Range 0-100 | |
![]() |
Return |
![]() |
WaitForSwitch |
Waits for the specified switch to be pressed. | |
![]() |
Switch |
Which switch do we want to wait for 0=Left, 1=Right, 2=Either, 3=Both | |
![]() |
Return |
![]() |
EncoderReadCount |
Reads one of the motor encoder counters. Each encoder count is equal to 0.314159 mm. | |
![]() |
Channel |
0 = LeftCount, 1=RightCount | |
![]() |
Return |
![]() |
CheckUSB |
Checks to see if a USB cable is connected to the robot. Returns 0 for no connection and 1 for an active connection. | |
![]() |
Return |
![]() |
LCDSetForegroundColour |
Sets the pixel colour to drive the LCD. Default colour is 1 where a set pixel is black and the background is white. | |
![]() |
Colour |
Range 0-1 : 0=White, 1=Black | |
![]() |
Return |
![]() |
Initialise |
Starts up the Formula Allcode PWM for motor control and performs the wait for button press if enabled. | |
![]() |
Return |
![]() |
LogoSetSpeed |
Sets the cruise speed for LOGO type macros. Default speed 20%. | |
![]() |
Speed |
Range 1-100, Default 60 | |
![]() |
Return |
![]() |
LCDClear |
Clears the contents of the graphical LCD. | |
![]() |
Return |