Component: Formula AllCode API (AllCode): Difference between revisions
Appearance
No edit summary |
m Text replacement - "class="wikitable" style="width:60%; background-color:#FFFFFF;"" to "class="mtx-class-macrotable wikitable"" |
||
| Line 83: | Line 83: | ||
===Backwards=== | ===Backwards=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| Line 102: | Line 102: | ||
===CardBitmap=== | ===CardBitmap=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| Line 131: | Line 131: | ||
===CardCreate=== | ===CardCreate=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| Line 150: | Line 150: | ||
===CardErase=== | ===CardErase=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| Line 169: | Line 169: | ||
===CardInit=== | ===CardInit=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| Line 183: | Line 183: | ||
===CardOpen=== | ===CardOpen=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| Line 202: | Line 202: | ||
===CardPlayback=== | ===CardPlayback=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| Line 221: | Line 221: | ||
===CardReadByte=== | ===CardReadByte=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| Line 235: | Line 235: | ||
===CardRecordMic=== | ===CardRecordMic=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| Line 269: | Line 269: | ||
===CardWriteByte=== | ===CardWriteByte=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| Line 288: | Line 288: | ||
===EncoderRead=== | ===EncoderRead=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| Line 307: | Line 307: | ||
===EncoderReset=== | ===EncoderReset=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| Line 321: | Line 321: | ||
===Forwards=== | ===Forwards=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| Line 340: | Line 340: | ||
===GetConsoleHandle=== | ===GetConsoleHandle=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| Line 354: | Line 354: | ||
===GetProp=== | ===GetProp=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| Line 373: | Line 373: | ||
===LCDBacklight=== | ===LCDBacklight=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| Line 392: | Line 392: | ||
===LCDClear=== | ===LCDClear=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| Line 406: | Line 406: | ||
===LCDDrawLine=== | ===LCDDrawLine=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| Line 440: | Line 440: | ||
===LCDDrawPixel=== | ===LCDDrawPixel=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| Line 469: | Line 469: | ||
===LCDDrawRect=== | ===LCDDrawRect=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| Line 503: | Line 503: | ||
===LCDPrintNumber=== | ===LCDPrintNumber=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| Line 532: | Line 532: | ||
===LCDPrintString=== | ===LCDPrintString=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| Line 561: | Line 561: | ||
===LCDVerbose=== | ===LCDVerbose=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| Line 580: | Line 580: | ||
===LEDOff=== | ===LEDOff=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| Line 599: | Line 599: | ||
===LEDOn=== | ===LEDOn=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| Line 618: | Line 618: | ||
===LEDWrite=== | ===LEDWrite=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| Line 637: | Line 637: | ||
===Left=== | ===Left=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| Line 656: | Line 656: | ||
===PlayNote=== | ===PlayNote=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| Line 680: | Line 680: | ||
===ReadAllSensors=== | ===ReadAllSensors=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| Line 694: | Line 694: | ||
===ReadAllValue=== | ===ReadAllValue=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| Line 713: | Line 713: | ||
===ReadAxis=== | ===ReadAxis=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| Line 732: | Line 732: | ||
===ReadBearing=== | ===ReadBearing=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| Line 746: | Line 746: | ||
===ReadIR=== | ===ReadIR=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| Line 765: | Line 765: | ||
===ReadLight=== | ===ReadLight=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| Line 779: | Line 779: | ||
===ReadLine=== | ===ReadLine=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| Line 798: | Line 798: | ||
===ReadMic=== | ===ReadMic=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| Line 812: | Line 812: | ||
===ReadSwitch=== | ===ReadSwitch=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| Line 831: | Line 831: | ||
===Right=== | ===Right=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| Line 850: | Line 850: | ||
===SampleAccel=== | ===SampleAccel=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| Line 864: | Line 864: | ||
===SampleMag=== | ===SampleMag=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| Line 878: | Line 878: | ||
===ServoAutoMoveToPosition=== | ===ServoAutoMoveToPosition=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| Line 902: | Line 902: | ||
===ServoDisable=== | ===ServoDisable=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| Line 921: | Line 921: | ||
===ServoEnable=== | ===ServoEnable=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| Line 940: | Line 940: | ||
===ServoSetAutoMoveSpeed=== | ===ServoSetAutoMoveSpeed=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| Line 959: | Line 959: | ||
===ServoSetPosition=== | ===ServoSetPosition=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| Line 983: | Line 983: | ||
===SetLogoSpeed=== | ===SetLogoSpeed=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| Line 1,002: | Line 1,002: | ||
===SetMotors=== | ===SetMotors=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| Line 1,026: | Line 1,026: | ||
===SetProp=== | ===SetProp=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| Line 1,051: | Line 1,051: | ||
==Property reference== | ==Property reference== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]] | ||
Revision as of 14:15, 13 July 2026
| Author | Matrix Ltd |
| Version | 1.2 |
| Category | AllCode |
Formula AllCode API component
A simulation only component to allow the Formula AllCode robot to be controlled via it's API interface and Bluetooth data connection without having to compile or re-program the robot.
Detailed description
No detailed description exists yet for this component
Examples
No additional examples
Macro reference
Backwards
| Backwards | |
| Drives the robot backwards - waits for the distance to be traversed before returning | |
| Distance | |
| Distance in mm | |
| Return | |
CardBitmap
| CardBitmap | |
| Displays a monochrome bitmap read from the card on the LCD | |
| X | |
| Range 0-127 | |
| Y | |
| Range 0-31 | |
| Filename | |
| Return | |
CardCreate
| CardCreate | |
| Attempts to create a file on the SD card 255=Error, 1=File Already Exists, 0=Create OK | |
| Filename | |
| Return | |
CardErase
| CardErase | |
| Attempts to delete an existing file on the SD card 255=Error, 1=File not found, 0=Delete OK | |
| Filename | |
| Return | |
CardInit
| CardInit | |
| Attempts to startup the SD card 255=No Card, 254=Init Fail, 0=Init OK | |
| Return | |
CardOpen
| CardOpen | |
| Attempts to open an existing file on the SD card 255=Error, 1=File not found, 0=Open OK | |
| Filename | |
| Return | |
CardPlayback
| CardPlayback | |
| Plays back a .Wav file audio stream from the card | |
| Filename | |
| Return | |
CardReadByte
| CardReadByte | |
| Reads a byte from the currently open file. Starts at the beginning of the file and auto increments to the end | |
| Return | |
CardRecordMic
CardWriteByte
| CardWriteByte | |
| Appends a byte to the end of the currently open file | |
| Data | |
| Return | |
EncoderRead
| EncoderRead | |
| Reads one of the motor encoder counters. Approx 0.328296mm of travel per encoder unit. | |
| index | |
| 0=Left, 1=Right | |
| Return | |
EncoderReset
| EncoderReset | |
| Resets the motor encoder counters | |
| Return | |
Forwards
| Forwards | |
| Drives the robot forwards - waits for the distance to be traversed before returning | |
| Distance | |
| Distance in mm | |
| Return | |
GetConsoleHandle
| GetConsoleHandle | |
| Gets the handle to the console allowing data displaying on the panel etc. | |
| Return | |
GetProp
| GetProp | |
| Allows the property filter for the COM port list to be copied to a parent component. | |
| PropName | |
| Return | |
LCDBacklight
| LCDBacklight | |
| Allows the LCD backlight brighntess to be adjusted | |
| Intensity | |
| Range 0-100, 0=Off, 1=Min Brightness, 100=Max Brightness | |
| Return | |
LCDClear
| LCDClear | |
| Clears the LCD | |
| Return | |
LCDDrawLine
| LCDDrawLine | |
| Allows a single pixel width line to be drawn on the LCD | |
| X1 | |
| X Pixel 0-127 | |
| Y1 | |
| Y Pixel 0-31 | |
| X2 | |
| X Pixel 0-127 | |
| Y2 | |
| Y Pixel 0-31 | |
| Return | |
LCDDrawPixel
| LCDDrawPixel | |
| Allows a single pixel on the LCD to be set or cleared | |
| X | |
| X Pixel 0-127 | |
| Y | |
| Y Pixel 0-31 | |
| State | |
| 0=White (Off), 1=Black (On) | |
| Return | |
LCDDrawRect
| LCDDrawRect | |
| Allows a rectangle to be drawn on the LCD | |
| X1 | |
| X Pixel 0-127 | |
| Y1 | |
| Y Pixel 0-31 | |
| X2 | |
| X Pixel 0-127 | |
| Y2 | |
| Y Pixel 0-31 | |
| Return | |
LCDPrintNumber
| LCDPrintNumber | |
| Prints a 16-bit signed number to the LCD | |
| X | |
| X Pixel 0-127 | |
| Y | |
| LCD Y coordinate 0-31 | |
| Number | |
| Range -32768 to 32767 | |
| Return | |
LCDPrintString
| LCDPrintString | |
| Prints a string to the LCD | |
| X | |
| X Pixel 0-127 | |
| Y | |
| LCD Y Coordinate 0-31 | |
| Data | |
| Return | |
LCDVerbose
| LCDVerbose | |
| Allows the LCD to automatically report the API commands as they get processed. Default - verbose on | |
| State | |
| 0=Off 1=On | |
| Return | |
LEDOff
| LEDOff | |
| Clears a single LED 0-7 | |
| index | |
| Range: 0-7 | |
| Return | |
LEDOn
| LEDOn | |
| Sets a single LED 0-7 | |
| index | |
| Range: 0-7 | |
| Return | |
LEDWrite
| LEDWrite | |
| Sets the value of the LEDs as an 8-bit output | |
| Value | |
| LED value 0=All Off, 255 = All On | |
| Return | |
Left
| Left | |
| Rotates the robot left - waits for the angle to be traversed before returning | |
| Angle | |
| Angle to turn in degrees | |
| Return | |
PlayNote
| PlayNote | |
| Plays a note using the speaker on the FA | |
| Note | |
| Range 1 to 65535 in Hz | |
| Delay | |
| Number of milliseconds to play the note for | |
| Return | |
ReadAllSensors
| ReadAllSensors | |
| Samples all of the robot's sensors at once, storing the values locally | |
| Return | |
ReadAllValue
| ReadAllValue | |
| Reads a single value stored from the read all command Index dictates which sensor value to read | |
| Index | |
| 0=SW, 1-8=IR, 9-10=Line, 11=Light, 12=Mic, 13-15=Accel | |
| Return | |
ReadAxis
| ReadAxis | |
| Reads a single X/Y/Z axis from the accelerometer sensor. | |
| index | |
| 0=X, 1=Y, 2=Z | |
| Return | |
ReadBearing
| ReadBearing | |
| Reads the compass bearing based on the degrees clockwise from magnetic north. | |
| Return | |
ReadIR
ReadLight
| ReadLight | |
| Reads the light sensor 0-4095 - 4095 = Max Brightness | |
| Return | |
ReadLine
| ReadLine | |
| Reads one of the IR line sensors 0-1 0=Left, 1=Right | |
| index | |
| 0=Left, 1=Right | |
| Return | |
ReadMic
| ReadMic | |
| Reads the microphone sensor 0 - 4095 | |
| Return | |
ReadSwitch
| ReadSwitch | |
| Read the switch value | |
| index | |
| 0 (left) or 1 (right) | |
| Return | |
Right
| Right | |
| Rotates the robot right - waits for the angle to be traversed before returning | |
| Angle | |
| Angle to turn in degrees | |
| Return | |
SampleAccel
| SampleAccel | |
| Samples the accelerometer 0 = no new data, 1 = new data available | |
| Return | |
SampleMag
| SampleMag | |
| Samples the magnetometer 0 = no new data, 1 = new data available | |
| Return | |
ServoAutoMoveToPosition
| ServoAutoMoveToPosition | |
| Allows one of the servo positions to move gradually to a new position | |
| Channel | |
| Range 0-3 | |
| Position | |
| Range 0-255 | |
| Return | |
ServoDisable
| ServoDisable | |
| Allows one of the servo outputs 0-3 to be disabled | |
| Channel | |
| Range 0-3 | |
| Return | |
ServoEnable
| ServoEnable | |
| Allows one of the servo outputs 0-3 to be enabled | |
| Channel | |
| Range 0-3 | |
| Return | |
ServoSetAutoMoveSpeed
| ServoSetAutoMoveSpeed | |
| Changes the speed of the auto movements Default - 1 | |
| Speed | |
| Range 1-50 | |
| Return | |
ServoSetPosition
| ServoSetPosition | |
| Allows one of the servo positions to be assigned | |
| Channel | |
| Range 0-3 | |
| Position | |
| Range 0-255 | |
| Return | |
SetLogoSpeed
| SetLogoSpeed | |
| Sets the speed of logo movements | |
| Speed | |
| Logo Speed 1-100 - Default 40 | |
| Return | |
SetMotors
| SetMotors | |
| Sets the motor speeds without feedback Range -100 to 100 | |
| Left | |
| Range -100 to 100 | |
| Right | |
| Range -100 to 100 | |
| Return | |
SetProp
| SetProp | |
| Allows the COM port property to be set from a parent component. | |
| PropName | |
| PropVal | |
| Return | |
Property reference
Component Source Code
Please click here to download the component source project: FC_Comp_Source_FormulaAllCode_API.fcsx
Please click here to view the component source code (Beta): FC_Comp_Source_FormulaAllCode_API.fcsx