uses pushing box to publish to google spreadsheets with a state machine instead of a while loop
Fork of GSM_PUSHING_BOX_STATE_MACHINE by
Diff: gsmqueue.cpp
- Revision:
- 32:424896b5adbe
- Parent:
- 29:bc5f53f2922a
diff -r a1e9fd23eb6a -r 424896b5adbe gsmqueue.cpp --- a/gsmqueue.cpp Tue Apr 28 03:03:19 2015 +0000 +++ b/gsmqueue.cpp Wed Oct 21 19:44:15 2015 +0000 @@ -10,7 +10,7 @@ //External variables extern Serial pc; //Print data to serial connection with computer -extern Serial gsm; //UART connection with GSM +//Serial gsm(D3,D2); //UART connection with GSM //Internal variables for a queue (wrap-around implementation) //Note that the DMA (direct memory access) stores data in this queue. Therefore, QUEUETAIL is incremented @@ -41,7 +41,7 @@ if (size > 0 && size <= MAX_SMS_LENGTH) //Don't send if too long or negative size { //Send the command - gsm.puts(sPtr); + //gsm.puts(sPtr); //The increment part below: Effectively "removes" characters we just sent from the buffer // by advancing queueHead by size - 1, or size + 2 // size - 1 is because SMS_END_CHAR does not show up on the DMA. @@ -54,7 +54,7 @@ else { queueHeadExp = incrementIndex(queueHead, size + 2); - gsm.puts("\n"); //make there be a \r\n in what we send (this is perfect.) + //gsm.puts("\n"); //make there be a \r\n in what we send (this is perfect.) //Why not "\r\n"? Previously we had thought the extra \r was added due to \r\n coming // through the command line: scanf only removed the \n as whitespace. However, upon // further investigation we realized this behavior occurs because the gsm.puts function