Difference between revisions of "Component: GSM (EB066, Generic AT) (Wireless)"
From Flowcode Help
Jump to navigationJump to search|  (Created page with "{| style="width:50%"  |-  | width="20%" style="color:gray;" | Author  | Matrix Ltd.  |-  | width="20%" style="color:gray;" | Version  | 2.0  |-  | width="20%" style="color:gra...") | |||
| Line 16: | Line 16: | ||
| ==Detailed description== | ==Detailed description== | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| ''No detailed description exists yet for this component'' | ''No detailed description exists yet for this component'' | ||
| − | |||
| − | |||
| − | |||
| − | |||
| ==Examples== | ==Examples== | ||
| − | + | ''<span style="color:red;">No additional examples</span>'' | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| ==Downloadable macro reference== | ==Downloadable macro reference== | ||
Revision as of 10:36, 17 November 2021
| Author | Matrix Ltd. | 
| Version | 2.0 | 
| Category | Wireless | 
Contents
GSM (EB066, Generic AT) component
Low level routines for controlling a standard AT GSM / GPRS interface Also available in the form of the EB066 GSM E-block.
Detailed description
No detailed description exists yet for this component
Examples
No additional examples
Downloadable macro reference
|   | DialNumber | 
| Performs a standard voice call by dialling the number specified. Returns 0 for call in progress and 255 for no response. | |
|  - STRING | Number | 
|  - BYTE | Return | 
|   | GetTextString | 
| Collects the text message data from an incoming text message. | |
|  - BYTE | NumBytes | 
|  - STRING | Return | 
|   | SendString | 
| Sends a string to the GSM module. | |
|  - STRING | Text | 
|  - VOID | Return | 
|   | SendScript | 
| Send an AT command script. Returns 0 for fail, 1 for success and 255 for unrecognised script idx. | |
|  - BYTE | idx | 
|  - BYTE | Return | 
|   | SendCommand | 
| Sends a command string to the GSM module. 0 = Command sent ok, 255 = No Reply | |
|  - STRING | Command | 
|  - BYTE | SendCR | 
|  - BYTE | Return | 
|   | AnswerIncomingCall | 
| Answers the phone for an incoming type call. Returns 0 for success and 255 for failure. | |
|  - BYTE | Return | 
|   | GetTextNumber | 
| Collects the sender's phone number from an incoming text message. | |
|  - BYTE | NumBytes | 
|  - STRING | Return | 
|   | HangUpCall | 
| Ends a voice based call. Returns 0 for success and 255 for failure. | |
|  - BYTE | Return | 
|   | ReadString | 
| Copies the data from the data string array to a local string variable | |
|  - BYTE | NumBytes | 
|  - STRING | Return | 
|   | SendTextMessage | 
| Sends the text message data specified to the number specified using the SMS protocol. Returns 0 for success and 255 for failure. | |
|  - STRING | Number | 
|  - STRING | Message | 
|  - BYTE | Return | 
|   | StringReceive | 
| Attempts to receive a string from the GSM modem. | |
|  - BYTE | Return | 
|   | DeleteAllMessages | 
| Removes all pending text messages from the GSM module. Returns 0 for success and 255 for fail. | |
|  - BYTE | Return | 
|   | CheckNetworkStatus | 
| Returns the state of the GSM network. 0 = Not connected, 1 = connected, 255 = no reply from GSM. | |
|  - BYTE | Return | 
|   | CheckForIncoming | 
| Checks to see if any incoming phone call or SMS message. 0 = Nothing, 1 = Text Received, 2 = Phone Ringing | |
|  - BYTE | Return | 
|   | Initialise | 
| Sets up the GSM module. Returns 0 for OK, 255 for no reply and 254 for command fail. | |
|  - BYTE | Return | 
|   | ReadMic | 
| Reads the microphone sensor 0 - 4095 | |
|  - UINT | Return | 
|   | ReadSwitch | 
| Read the switch value | |
|  - BYTE | index | 
| 0 (left) or 1 (right) | |
|  - BYTE | Return | 
|   | SampleAccel | 
| Samples the accelerometer 0 = no new data, 1 = new data available | |
|  - BYTE | Return | 
|   | Left | 
| Rotates the robot left - waits for the angle to be traversed before returning | |
|  - UINT | Angle | 
| Angle to turn in degrees | |
|  - VOID | Return | 
|   | LCDDrawPixel | 
| Allows a single pixel on the LCD to be set or cleared | |
|  - BYTE | X | 
| X Pixel 0-127 | |
|  - BYTE | Y | 
| Y Pixel 0-31 | |
|  - BYTE | State | 
| 0=White (Off), 1=Black (On) | |
|  - VOID | Return | 
|   | ServoSetPosition | 
| Allows one of the servo positions to be assigned | |
|  - BYTE | Channel | 
| Range 0-3 | |
|  - BYTE | Position | 
| Range 0-255 | |
|  - VOID | Return | 
|   | CardBitmap | 
| Displays a monochrome bitmap read from the card on the LCD | |
|  - BYTE | X | 
| Range 0-127 | |
|  - BYTE | Y | 
| Range 0-31 | |
|  - STRING | Filename | 
|  - BYTE | Return | 
|   | CardOpen | 
| Attempts to open an existing file on the SD card 255=Error, 1=File not found, 0=Open OK | |
|  - STRING | Filename | 
|  - BYTE | Return | 
|   | Forwards | 
| Drives the robot forwards - waits for the distance to be traversed before returning | |
|  - UINT | Distance | 
| Distance in mm | |
|  - VOID | Return | 
|   | ReadBearing | 
| Reads the compass bearing based on the degrees clockwise from magnetic north. | |
| [[File:]] - | Return | 
|   | GetConsoleHandle | 
| Gets the handle to the console allowing data displaying on the panel etc. | |
| [[File:]] - | Return | 
|   | LCDDrawLine | 
| Allows a single pixel width line to be drawn on the LCD | |
|  - BYTE | X1 | 
| X Pixel 0-127 | |
|  - BYTE | Y1 | 
| Y Pixel 0-31 | |
|  - BYTE | X2 | 
| X Pixel 0-127 | |
|  - BYTE | Y2 | 
| Y Pixel 0-31 | |
|  - VOID | Return | 
|   | ServoAutoMoveToPosition | 
| Allows one of the servo positions to move gradually to a new position | |
|  - BYTE | Channel | 
| Range 0-3 | |
|  - BYTE | Position | 
| Range 0-255 | |
|  - VOID | Return | 
|   | ReadAllValue | 
| Reads a single value stored from the read all command Index dictates which sensor value to read | |
|  - BYTE | Index | 
| 0=SW, 1-8=IR, 9-10=Line, 11=Light, 12=Mic, 13-15=Accel | |
|  - UINT | Return | 
|   | LCDBacklight | 
| Allows the LCD backlight brighntess to be adjusted | |
|  - BYTE | Intensity | 
| Range 0-100, 0=Off, 1=Min Brightness, 100=Max Brightness | |
|  - VOID | Return | 
|   | LCDDrawRect | 
| Allows a rectangle to be drawn on the LCD | |
|  - BYTE | X1 | 
| X Pixel 0-127 | |
|  - BYTE | Y1 | 
| Y Pixel 0-31 | |
|  - BYTE | X2 | 
| X Pixel 0-127 | |
|  - BYTE | Y2 | 
| Y Pixel 0-31 | |
|  - VOID | Return | 
|   | ReadLine | 
| Reads one of the IR line sensors 0-1 0=Left, 1=Right | |
|  - BYTE | index | 
| 0=Left, 1=Right | |
|  - UINT | Return | 
|   | ServoDisable | 
| Allows one of the servo outputs 0-3 to be disabled | |
|  - BYTE | Channel | 
| Range 0-3 | |
|  - VOID | Return | 
|   | ServoEnable | 
| Allows one of the servo outputs 0-3 to be enabled | |
|  - BYTE | Channel | 
| Range 0-3 | |
|  - VOID | Return | 
|   | CardReadByte | 
| Reads a byte from the currently open file. Starts at the beginning of the file and auto increments to the end | |
|  - BYTE | Return | 
|   | CardErase | 
| Attempts to delete an existing file on the SD card 255=Error, 1=File not found, 0=Delete OK | |
|  - STRING | Filename | 
|  - BYTE | Return | 
|   | CardWriteByte | 
| Appends a byte to the end of the currently open file | |
|  - BYTE | Data | 
|  - VOID | Return | 
|   | EncoderRead | 
| Reads one of the motor encoder counters. Approx 0.328296mm of travel per encoder unit. | |
|  - BYTE | index | 
| 0=Left, 1=Right | |
|  - UINT | Return | 
|   | SetMotors | 
| Sets the motor speeds without feedback Range -100 to 100 | |
| [[File:]] - | Left | 
| Range -100 to 100 | |
| [[File:]] - | Right | 
| Range -100 to 100 | |
|  - VOID | Return | 
|   | Backwards | 
| Drives the robot backwards - waits for the distance to be traversed before returning | |
|  - UINT | Distance | 
| Distance in mm | |
|  - VOID | Return | 
|   | EncoderReset | 
| Resets the motor encoder counters | |
|  - VOID | Return | 
|   | LCDVerbose | 
| Allows the LCD to automatically report the API commands as they get processed. Default - verbose on | |
|  - BYTE | State | 
| 0=Off 1=On | |
|  - VOID | Return | 
|   | SetProp | 
| Allows the COM port property to be set from a parent component. | |
|  - STRING | PropName | 
|  - ULONG | PropVal | 
|  - VOID | Return | 
|   | CardInit | 
| Attempts to startup the SD card 255=No Card, 254=Init Fail, 0=Init OK | |
|  - BYTE | Return | 
|   | GetProp | 
| Allows the property filter for the COM port list to be copied to a parent component. | |
|  - STRING | PropName | 
|  - STRING | Return | 
|   | LCDClear | 
| Clears the LCD | |
|  - VOID | Return | 









