Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
main.cpp@4:04351e4aad49, 2017-02-13 (annotated)
- Committer:
- EmileArseneault
- Date:
- Mon Feb 13 19:47:34 2017 +0000
- Revision:
- 4:04351e4aad49
- Parent:
- 2:c6d623a30254
- Parent:
- 3:5010d20e681f
- Child:
- 5:d5349e68b9f8
Merge deux codes Atcommand and log messages
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| ShaolinPoutine | 0:25f9d14d01bd | 1 | #include "mbed.h" |
| ShaolinPoutine | 0:25f9d14d01bd | 2 | #define FRAMEDELIMITER 0x7E |
| ShaolinPoutine | 1:318ad4f36a90 | 3 | #include "rtos.h" |
| ShaolinPoutine | 0:25f9d14d01bd | 4 | |
| ShaolinPoutine | 1:318ad4f36a90 | 5 | // 4269 |
| ShaolinPoutine | 0:25f9d14d01bd | 6 | DigitalOut resetswitch(p8); |
| ShaolinPoutine | 0:25f9d14d01bd | 7 | Serial xbee(p13, p14); |
| ShaolinPoutine | 0:25f9d14d01bd | 8 | Serial pc(USBTX, USBRX); |
| ShaolinPoutine | 0:25f9d14d01bd | 9 | DigitalOut myled(LED1); |
| ShaolinPoutine | 0:25f9d14d01bd | 10 | |
| ShaolinPoutine | 0:25f9d14d01bd | 11 | int CalculateChecksum() |
| ShaolinPoutine | 0:25f9d14d01bd | 12 | { |
| ShaolinPoutine | 0:25f9d14d01bd | 13 | // Does not include frame delimiter and lenght |
| ShaolinPoutine | 0:25f9d14d01bd | 14 | return 1; |
| ShaolinPoutine | 0:25f9d14d01bd | 15 | } |
| ShaolinPoutine | 0:25f9d14d01bd | 16 | |
| ShaolinPoutine | 0:25f9d14d01bd | 17 | int CalculateLenght() |
| ShaolinPoutine | 0:25f9d14d01bd | 18 | { |
| ShaolinPoutine | 0:25f9d14d01bd | 19 | // Calculate the number of bytes in the frame data |
| ShaolinPoutine | 0:25f9d14d01bd | 20 | return 1; |
| ShaolinPoutine | 0:25f9d14d01bd | 21 | } |
| ShaolinPoutine | 0:25f9d14d01bd | 22 | |
| ShaolinPoutine | 0:25f9d14d01bd | 23 | void printhexa(char c) |
| ShaolinPoutine | 0:25f9d14d01bd | 24 | { |
| ShaolinPoutine | 0:25f9d14d01bd | 25 | char msb = c >> 4; |
| ShaolinPoutine | 0:25f9d14d01bd | 26 | char lsb = c & 0xF; |
| ShaolinPoutine | 0:25f9d14d01bd | 27 | |
| ShaolinPoutine | 0:25f9d14d01bd | 28 | if (msb < 10) |
| ShaolinPoutine | 0:25f9d14d01bd | 29 | msb += 0x30; |
| ShaolinPoutine | 0:25f9d14d01bd | 30 | else |
| ShaolinPoutine | 0:25f9d14d01bd | 31 | msb += 0x37; |
| ShaolinPoutine | 0:25f9d14d01bd | 32 | |
| ShaolinPoutine | 0:25f9d14d01bd | 33 | if (lsb < 10) |
| ShaolinPoutine | 0:25f9d14d01bd | 34 | lsb += 0x30; |
| ShaolinPoutine | 0:25f9d14d01bd | 35 | else |
| ShaolinPoutine | 0:25f9d14d01bd | 36 | lsb += 0x37; |
| ShaolinPoutine | 0:25f9d14d01bd | 37 | |
| ShaolinPoutine | 0:25f9d14d01bd | 38 | pc.putc('0'); |
| ShaolinPoutine | 0:25f9d14d01bd | 39 | pc.putc('x'); |
| ShaolinPoutine | 0:25f9d14d01bd | 40 | pc.putc(msb); |
| ShaolinPoutine | 0:25f9d14d01bd | 41 | pc.putc(lsb); |
| ShaolinPoutine | 0:25f9d14d01bd | 42 | pc.putc(' '); |
| ShaolinPoutine | 0:25f9d14d01bd | 43 | } |
| ShaolinPoutine | 0:25f9d14d01bd | 44 | |
| ShaolinPoutine | 2:c6d623a30254 | 45 | void ATCommandResponse(int len, char* ans) |
| ShaolinPoutine | 2:c6d623a30254 | 46 | { |
| ShaolinPoutine | 2:c6d623a30254 | 47 | char total = 0x88; |
| ShaolinPoutine | 2:c6d623a30254 | 48 | char id = xbee.getc(); |
| ShaolinPoutine | 2:c6d623a30254 | 49 | total += id; |
| ShaolinPoutine | 2:c6d623a30254 | 50 | char command[2]; |
| ShaolinPoutine | 2:c6d623a30254 | 51 | command[0] = xbee.getc(); |
| ShaolinPoutine | 2:c6d623a30254 | 52 | total += command[0]; |
| ShaolinPoutine | 2:c6d623a30254 | 53 | command[1] = xbee.getc(); |
| ShaolinPoutine | 2:c6d623a30254 | 54 | total += command[1]; |
| ShaolinPoutine | 2:c6d623a30254 | 55 | char status = xbee.getc(); |
| ShaolinPoutine | 2:c6d623a30254 | 56 | total += status; |
| ShaolinPoutine | 2:c6d623a30254 | 57 | int i = 0; |
| ShaolinPoutine | 2:c6d623a30254 | 58 | len-= 4; |
| ShaolinPoutine | 2:c6d623a30254 | 59 | char data[len]; |
| ShaolinPoutine | 2:c6d623a30254 | 60 | |
| ShaolinPoutine | 2:c6d623a30254 | 61 | pc.printf("response to command %c%c", command[0], command[1]); |
| ShaolinPoutine | 2:c6d623a30254 | 62 | pc.printf(" is "); |
| ShaolinPoutine | 2:c6d623a30254 | 63 | |
| ShaolinPoutine | 2:c6d623a30254 | 64 | while (i < len) |
| ShaolinPoutine | 2:c6d623a30254 | 65 | { |
| ShaolinPoutine | 2:c6d623a30254 | 66 | if (xbee.readable()) |
| ShaolinPoutine | 2:c6d623a30254 | 67 | { |
| ShaolinPoutine | 2:c6d623a30254 | 68 | data[i] = xbee.getc(); |
| ShaolinPoutine | 2:c6d623a30254 | 69 | total += data[i]; |
| ShaolinPoutine | 2:c6d623a30254 | 70 | printhexa(data[i]); |
| ShaolinPoutine | 2:c6d623a30254 | 71 | i++; |
| ShaolinPoutine | 2:c6d623a30254 | 72 | } |
| ShaolinPoutine | 2:c6d623a30254 | 73 | } |
| ShaolinPoutine | 2:c6d623a30254 | 74 | |
| ShaolinPoutine | 2:c6d623a30254 | 75 | char checksum = xbee.getc(); |
| ShaolinPoutine | 2:c6d623a30254 | 76 | total += checksum; |
| ShaolinPoutine | 2:c6d623a30254 | 77 | // Verify checksum |
| ShaolinPoutine | 2:c6d623a30254 | 78 | if (total != 0xFF) |
| ShaolinPoutine | 2:c6d623a30254 | 79 | { |
| ShaolinPoutine | 2:c6d623a30254 | 80 | pc.printf("Checksum is wrong"); |
| ShaolinPoutine | 2:c6d623a30254 | 81 | } |
| ShaolinPoutine | 2:c6d623a30254 | 82 | pc.printf("\r\n"); |
| ShaolinPoutine | 2:c6d623a30254 | 83 | ans = data; |
| ShaolinPoutine | 2:c6d623a30254 | 84 | } |
| ShaolinPoutine | 2:c6d623a30254 | 85 | |
| ShaolinPoutine | 2:c6d623a30254 | 86 | void ModemStatus(int len, char* ans) |
| ShaolinPoutine | 2:c6d623a30254 | 87 | { |
| ShaolinPoutine | 2:c6d623a30254 | 88 | char status = xbee.getc(); |
| ShaolinPoutine | 2:c6d623a30254 | 89 | |
| ShaolinPoutine | 2:c6d623a30254 | 90 | switch (status){ |
| ShaolinPoutine | 2:c6d623a30254 | 91 | case 0 : pc.printf("Hardware reset\r\n"); break; |
| ShaolinPoutine | 2:c6d623a30254 | 92 | case 1 : pc.printf("Watchdog timer reset\r\n"); break; |
| ShaolinPoutine | 2:c6d623a30254 | 93 | case 2 : pc.printf("Joined network (routers and end devices)\r\n"); break; |
| ShaolinPoutine | 2:c6d623a30254 | 94 | case 3 : pc.printf("Disassociated\r\n"); break; |
| ShaolinPoutine | 2:c6d623a30254 | 95 | case 6 : pc.printf("Coordinator started\r\n"); break; |
| ShaolinPoutine | 2:c6d623a30254 | 96 | case 7 : pc.printf("Network security key was updated\r\n"); break; |
| ShaolinPoutine | 2:c6d623a30254 | 97 | case 0x0D : pc.printf("Voltage supply limit exceeded\r\n"); break; |
| ShaolinPoutine | 2:c6d623a30254 | 98 | case 0x11 : pc.printf("Modem configuration changed while join in progress\r\n"); break; |
| ShaolinPoutine | 2:c6d623a30254 | 99 | default : pc.printf("stack error\r\n"); break; |
| ShaolinPoutine | 2:c6d623a30254 | 100 | } |
| ShaolinPoutine | 2:c6d623a30254 | 101 | |
| ShaolinPoutine | 2:c6d623a30254 | 102 | char checksum = xbee.getc(); |
| ShaolinPoutine | 2:c6d623a30254 | 103 | |
| ShaolinPoutine | 2:c6d623a30254 | 104 | checksum += 0x8A + status; |
| ShaolinPoutine | 2:c6d623a30254 | 105 | |
| ShaolinPoutine | 2:c6d623a30254 | 106 | if (checksum != 0xFF) |
| ShaolinPoutine | 2:c6d623a30254 | 107 | { |
| ShaolinPoutine | 2:c6d623a30254 | 108 | pc.printf("Checksum is wrong\r\n"); |
| ShaolinPoutine | 2:c6d623a30254 | 109 | } |
| ShaolinPoutine | 2:c6d623a30254 | 110 | *ans = status; |
| ShaolinPoutine | 2:c6d623a30254 | 111 | } |
| ShaolinPoutine | 2:c6d623a30254 | 112 | |
| ShaolinPoutine | 2:c6d623a30254 | 113 | char* GetATResponse() |
| ShaolinPoutine | 0:25f9d14d01bd | 114 | { |
| ShaolinPoutine | 0:25f9d14d01bd | 115 | char start = xbee.getc(); // = FRAMEDELIMITER |
| ShaolinPoutine | 0:25f9d14d01bd | 116 | //assert |
| ShaolinPoutine | 0:25f9d14d01bd | 117 | char len_msb = xbee.getc(); |
| ShaolinPoutine | 0:25f9d14d01bd | 118 | char len_lsb = xbee.getc(); |
| ShaolinPoutine | 1:318ad4f36a90 | 119 | |
| ShaolinPoutine | 0:25f9d14d01bd | 120 | int len = ((int) len_msb << 4) + (int) len_lsb; |
| ShaolinPoutine | 0:25f9d14d01bd | 121 | char frame_data[len]; |
| ShaolinPoutine | 2:c6d623a30254 | 122 | |
| ShaolinPoutine | 2:c6d623a30254 | 123 | // Resolving frame type |
| ShaolinPoutine | 2:c6d623a30254 | 124 | char type = xbee.getc(); |
| ShaolinPoutine | 2:c6d623a30254 | 125 | char *response; |
| ShaolinPoutine | 2:c6d623a30254 | 126 | len--; |
| ShaolinPoutine | 2:c6d623a30254 | 127 | |
| ShaolinPoutine | 2:c6d623a30254 | 128 | switch (type){ |
| ShaolinPoutine | 2:c6d623a30254 | 129 | case 0x88: ATCommandResponse(len, response); |
| ShaolinPoutine | 2:c6d623a30254 | 130 | break; |
| ShaolinPoutine | 2:c6d623a30254 | 131 | case 0x8A: ModemStatus(len, response); |
| ShaolinPoutine | 2:c6d623a30254 | 132 | pc.printf(response); |
| ShaolinPoutine | 2:c6d623a30254 | 133 | break; |
| ShaolinPoutine | 2:c6d623a30254 | 134 | default: pc.printf("Please implement response of type"); |
| ShaolinPoutine | 2:c6d623a30254 | 135 | printhexa(type); |
| ShaolinPoutine | 2:c6d623a30254 | 136 | pc.printf("\r\n"); |
| ShaolinPoutine | 2:c6d623a30254 | 137 | for (int i = -1; i <len; i++) xbee.getc(); |
| ShaolinPoutine | 0:25f9d14d01bd | 138 | } |
| ShaolinPoutine | 2:c6d623a30254 | 139 | return response; |
| ShaolinPoutine | 0:25f9d14d01bd | 140 | } |
| ShaolinPoutine | 0:25f9d14d01bd | 141 | |
| ShaolinPoutine | 2:c6d623a30254 | 142 | |
| ShaolinPoutine | 0:25f9d14d01bd | 143 | void ReadSerial() |
| ShaolinPoutine | 0:25f9d14d01bd | 144 | { |
| ShaolinPoutine | 0:25f9d14d01bd | 145 | // 00 13 A2 00 |
| ShaolinPoutine | 0:25f9d14d01bd | 146 | // 40 3E 09 63 |
| ShaolinPoutine | 0:25f9d14d01bd | 147 | char cmdtosend[8]; |
| ShaolinPoutine | 0:25f9d14d01bd | 148 | int i = 0; |
| ShaolinPoutine | 0:25f9d14d01bd | 149 | |
| ShaolinPoutine | 0:25f9d14d01bd | 150 | cmdtosend[0] = FRAMEDELIMITER; |
| ShaolinPoutine | 0:25f9d14d01bd | 151 | cmdtosend[1] = 0x00; |
| ShaolinPoutine | 0:25f9d14d01bd | 152 | cmdtosend[2] = 0x04; |
| ShaolinPoutine | 0:25f9d14d01bd | 153 | cmdtosend[3] = 0x08; |
| ShaolinPoutine | 0:25f9d14d01bd | 154 | cmdtosend[4] = 0x52; |
| ShaolinPoutine | 0:25f9d14d01bd | 155 | cmdtosend[5] = 'S'; // 0x53 |
| ShaolinPoutine | 2:c6d623a30254 | 156 | cmdtosend[6] = 'H'; // 0x48 |
| ShaolinPoutine | 0:25f9d14d01bd | 157 | cmdtosend[7] = 0xFF - (cmdtosend[3]+cmdtosend[4]+cmdtosend[5]+cmdtosend[6]); |
| ShaolinPoutine | 0:25f9d14d01bd | 158 | |
| ShaolinPoutine | 0:25f9d14d01bd | 159 | while (i < 8) |
| ShaolinPoutine | 0:25f9d14d01bd | 160 | { |
| ShaolinPoutine | 0:25f9d14d01bd | 161 | xbee.putc(cmdtosend[i]); |
| ShaolinPoutine | 0:25f9d14d01bd | 162 | i++; |
| ShaolinPoutine | 0:25f9d14d01bd | 163 | } |
| ShaolinPoutine | 0:25f9d14d01bd | 164 | |
| ShaolinPoutine | 1:318ad4f36a90 | 165 | wait(0.5); |
| ShaolinPoutine | 1:318ad4f36a90 | 166 | i = 0; |
| ShaolinPoutine | 0:25f9d14d01bd | 167 | cmdtosend[0] = FRAMEDELIMITER; |
| ShaolinPoutine | 0:25f9d14d01bd | 168 | cmdtosend[1] = 0x00; |
| ShaolinPoutine | 0:25f9d14d01bd | 169 | cmdtosend[2] = 0x04; |
| ShaolinPoutine | 0:25f9d14d01bd | 170 | cmdtosend[3] = 0x08; |
| ShaolinPoutine | 0:25f9d14d01bd | 171 | cmdtosend[4] = 0x52; |
| ShaolinPoutine | 0:25f9d14d01bd | 172 | cmdtosend[5] = 'S'; // 0x53 |
| ShaolinPoutine | 2:c6d623a30254 | 173 | cmdtosend[6] = 'L'; // 0x48 |
| ShaolinPoutine | 0:25f9d14d01bd | 174 | cmdtosend[7] = 0xFF - (cmdtosend[3]+cmdtosend[4]+cmdtosend[5]+cmdtosend[6]); |
| ShaolinPoutine | 0:25f9d14d01bd | 175 | |
| ShaolinPoutine | 0:25f9d14d01bd | 176 | while (i < 8) |
| ShaolinPoutine | 0:25f9d14d01bd | 177 | { |
| ShaolinPoutine | 0:25f9d14d01bd | 178 | xbee.putc(cmdtosend[i]); |
| ShaolinPoutine | 0:25f9d14d01bd | 179 | i++; |
| ShaolinPoutine | 0:25f9d14d01bd | 180 | } |
| ShaolinPoutine | 0:25f9d14d01bd | 181 | } |
| ShaolinPoutine | 0:25f9d14d01bd | 182 | |
| EmileArseneault | 3:5010d20e681f | 183 | void AtCommand(char FirstChar, char SecondChar, char *OptionalParam = NULL, int ParamLen = 0) |
| EmileArseneault | 3:5010d20e681f | 184 | { |
| EmileArseneault | 3:5010d20e681f | 185 | // Frame Type 0x08 |
| EmileArseneault | 3:5010d20e681f | 186 | // Two char as parameters |
| EmileArseneault | 3:5010d20e681f | 187 | |
| EmileArseneault | 3:5010d20e681f | 188 | char cmdtosend[10]; |
| EmileArseneault | 3:5010d20e681f | 189 | char sum = 0; |
| EmileArseneault | 3:5010d20e681f | 190 | int cmdlength = 8; |
| EmileArseneault | 3:5010d20e681f | 191 | int i = 0; |
| EmileArseneault | 3:5010d20e681f | 192 | |
| EmileArseneault | 3:5010d20e681f | 193 | cmdtosend[0] = FRAMEDELIMITER; |
| EmileArseneault | 3:5010d20e681f | 194 | cmdtosend[1] = 0x00; |
| EmileArseneault | 3:5010d20e681f | 195 | cmdtosend[2] = 0x04 + ParamLen; |
| EmileArseneault | 3:5010d20e681f | 196 | cmdtosend[3] = 0x08; |
| EmileArseneault | 3:5010d20e681f | 197 | cmdtosend[4] = 0x52; |
| EmileArseneault | 3:5010d20e681f | 198 | cmdtosend[5] = FirstChar; |
| EmileArseneault | 3:5010d20e681f | 199 | cmdtosend[6] = SecondChar; |
| EmileArseneault | 3:5010d20e681f | 200 | |
| EmileArseneault | 3:5010d20e681f | 201 | // Ajouter les parametres au message |
| EmileArseneault | 3:5010d20e681f | 202 | if(OptionalParam != NULL) |
| EmileArseneault | 3:5010d20e681f | 203 | { |
| EmileArseneault | 3:5010d20e681f | 204 | i = 0; |
| EmileArseneault | 3:5010d20e681f | 205 | cmdlength += ParamLen; |
| EmileArseneault | 3:5010d20e681f | 206 | |
| EmileArseneault | 3:5010d20e681f | 207 | while (i < ParamLen) |
| EmileArseneault | 3:5010d20e681f | 208 | { |
| EmileArseneault | 3:5010d20e681f | 209 | pc.putc((OptionalParam)[i]); |
| EmileArseneault | 3:5010d20e681f | 210 | cmdtosend[7 + i] = (OptionalParam)[i]; |
| EmileArseneault | 3:5010d20e681f | 211 | i++; |
| EmileArseneault | 3:5010d20e681f | 212 | } |
| EmileArseneault | 3:5010d20e681f | 213 | pc.printf("\r\n"); |
| EmileArseneault | 3:5010d20e681f | 214 | } |
| EmileArseneault | 3:5010d20e681f | 215 | |
| EmileArseneault | 3:5010d20e681f | 216 | // Calculate checksum |
| EmileArseneault | 3:5010d20e681f | 217 | i = 3; |
| EmileArseneault | 3:5010d20e681f | 218 | while (i < (cmdlength - 1)) |
| EmileArseneault | 3:5010d20e681f | 219 | { |
| EmileArseneault | 3:5010d20e681f | 220 | sum += cmdtosend[i]; |
| EmileArseneault | 3:5010d20e681f | 221 | i++; |
| EmileArseneault | 3:5010d20e681f | 222 | } |
| EmileArseneault | 3:5010d20e681f | 223 | cmdtosend[cmdlength - 1] = 0xFF - sum; |
| EmileArseneault | 3:5010d20e681f | 224 | |
| EmileArseneault | 3:5010d20e681f | 225 | // Envoyer la commande sur UART |
| EmileArseneault | 3:5010d20e681f | 226 | i = 0; |
| EmileArseneault | 3:5010d20e681f | 227 | while (i < cmdlength) |
| EmileArseneault | 3:5010d20e681f | 228 | { |
| EmileArseneault | 3:5010d20e681f | 229 | xbee.putc(cmdtosend[i]); |
| EmileArseneault | 3:5010d20e681f | 230 | i++; |
| EmileArseneault | 3:5010d20e681f | 231 | } |
| EmileArseneault | 3:5010d20e681f | 232 | } |
| EmileArseneault | 3:5010d20e681f | 233 | |
| ShaolinPoutine | 0:25f9d14d01bd | 234 | |
| ShaolinPoutine | 1:318ad4f36a90 | 235 | void xbee_reader() |
| ShaolinPoutine | 1:318ad4f36a90 | 236 | { |
| ShaolinPoutine | 1:318ad4f36a90 | 237 | while(1) |
| ShaolinPoutine | 1:318ad4f36a90 | 238 | { |
| ShaolinPoutine | 1:318ad4f36a90 | 239 | if (xbee.readable()) |
| ShaolinPoutine | 1:318ad4f36a90 | 240 | { |
| ShaolinPoutine | 1:318ad4f36a90 | 241 | GetATResponse(); |
| ShaolinPoutine | 1:318ad4f36a90 | 242 | } |
| ShaolinPoutine | 1:318ad4f36a90 | 243 | wait(0.001); |
| ShaolinPoutine | 1:318ad4f36a90 | 244 | } |
| ShaolinPoutine | 1:318ad4f36a90 | 245 | } |
| ShaolinPoutine | 1:318ad4f36a90 | 246 | |
| ShaolinPoutine | 1:318ad4f36a90 | 247 | void tick() |
| ShaolinPoutine | 1:318ad4f36a90 | 248 | { |
| ShaolinPoutine | 1:318ad4f36a90 | 249 | myled = !myled; |
| ShaolinPoutine | 1:318ad4f36a90 | 250 | } |
| ShaolinPoutine | 1:318ad4f36a90 | 251 | |
| ShaolinPoutine | 0:25f9d14d01bd | 252 | int main() { |
| ShaolinPoutine | 1:318ad4f36a90 | 253 | Thread thread(xbee_reader); |
| ShaolinPoutine | 1:318ad4f36a90 | 254 | Ticker ticker; |
| ShaolinPoutine | 1:318ad4f36a90 | 255 | ticker.attach(&tick, 1); |
| ShaolinPoutine | 0:25f9d14d01bd | 256 | pc.printf("\r\n"); |
| ShaolinPoutine | 0:25f9d14d01bd | 257 | resetswitch = 0; |
| ShaolinPoutine | 0:25f9d14d01bd | 258 | wait(0.4); |
| ShaolinPoutine | 0:25f9d14d01bd | 259 | resetswitch = 1; |
| ShaolinPoutine | 0:25f9d14d01bd | 260 | |
| ShaolinPoutine | 1:318ad4f36a90 | 261 | wait(3); |
| ShaolinPoutine | 1:318ad4f36a90 | 262 | |
| EmileArseneault | 3:5010d20e681f | 263 | char Params[2] = {'a', 'b'}; |
| EmileArseneault | 3:5010d20e681f | 264 | |
| ShaolinPoutine | 0:25f9d14d01bd | 265 | ReadSerial(); |
| EmileArseneault | 3:5010d20e681f | 266 | wait(0.5); |
| EmileArseneault | 3:5010d20e681f | 267 | AtCommand('O', 'I'); |
| EmileArseneault | 3:5010d20e681f | 268 | wait(0.5); |
| EmileArseneault | 3:5010d20e681f | 269 | AtCommand('I', 'I', &Params[0], 2); |
| EmileArseneault | 3:5010d20e681f | 270 | wait(0.5); |
| EmileArseneault | 3:5010d20e681f | 271 | AtCommand('O', 'I'); |
| EmileArseneault | 3:5010d20e681f | 272 | wait(0.5); |
| EmileArseneault | 3:5010d20e681f | 273 | |
| ShaolinPoutine | 0:25f9d14d01bd | 274 | |
| ShaolinPoutine | 0:25f9d14d01bd | 275 | while(1) { |
| ShaolinPoutine | 0:25f9d14d01bd | 276 | } |
| ShaolinPoutine | 0:25f9d14d01bd | 277 | } |