Last active
October 29, 2017 14:59
-
-
Save KazuyukiEguchi/77b1ad4abae5d7d586e653a872977b8d to your computer and use it in GitHub Desktop.
Wio LTE (ATコマンドを使ってみた) ref: http://qiita.com/KazuyukiEguchi/items/4a366394faf15467209c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <WioLTEforArduino.h> | |
#define EC21J Serial1 | |
WioLTE Wio; | |
void setup() { | |
delay(200); | |
SerialUSB.println(""); | |
SerialUSB.println("--- START ---------------------------------------------------"); | |
SerialUSB.println("### I/O Initialize."); | |
Wio.Init(); | |
SerialUSB.println("### Power supply ON."); | |
Wio.PowerSupplyLTE(true); | |
delay(5000); | |
SerialUSB.println("### Turn on or reset."); | |
if (!Wio.TurnOnOrReset()) { | |
SerialUSB.println("### ERROR! ###"); | |
return; | |
} | |
delay(3000); | |
SerialUSB.println("Loop Start"); | |
} | |
void test_time2() | |
{ | |
EC21J.write("AT+CCLK?"); | |
EC21J.write(0x0d); | |
delay(1000); | |
while (EC21J.available() > 0) { | |
SerialUSB.write(EC21J.read()); | |
} | |
} | |
void loop() { | |
test_time2(); | |
delay(5000); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment