Skip to content

Instantly share code, notes, and snippets.

@KazuyukiEguchi
Last active October 29, 2017 14:58
Show Gist options
  • Save KazuyukiEguchi/ad4c803ce5deacf7a130a2eb9559c984 to your computer and use it in GitHub Desktop.
Save KazuyukiEguchi/ad4c803ce5deacf7a130a2eb9559c984 to your computer and use it in GitHub Desktop.
Wio LTEで、mineo au SIMで使ってみる。 ref: http://qiita.com/KazuyukiEguchi/items/bf9a6c3a3bc7abf128c7
#include <WioLTEforArduino.h>
#include <limits.h>
WioLTE Wio;
void setup() {
// put your setup code here, to run once:
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);
if(Wio.Activate("mineo.jp", "mineo@k-opti.com", "mineo") == true)
{
SerialUSB.println("Activate is True");
}
else
{
SerialUSB.println("Activate is False");
}
}
void loop() {
char num[20];
// put your main code here, to run repeatedly:
SerialUSB.println("...");
if(Wio.IsBusy() == false) {
if(Wio.GetPhoneNumber(num,sizeof(num)) > 0) {
SerialUSB.println(num);
}
}
int rssi = Wio.GetReceivedSignalStrength();
if (rssi == INT_MIN) {
SerialUSB.println("### ERROR! ###");
goto err;
}
SerialUSB.print("RSSI:");
SerialUSB.print(rssi);
SerialUSB.println("");
err:
delay(5000);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment