我现在正在使用usage: [-h] action
positional arguments:
action The action to do. Eligible values: install, remove, version
optional arguments:
-h, --help show this help message and exit
构建前端项目。
运行良好。
但是在Windows上,当我运行Gatsby
且dev-server从不启动时,出现这些错误。
gatsby develop
有人知道为什么会这样吗?
答案 0 :(得分:0)
#include<SoftwareSerial.h>
SoftwareSerial mySerial(9, 10);//Connect to pin 9&10 on GSM module
const byte numChars = 128; //character size
char receivedChars[numChars]; // Store data read from SMS
boolean newData = false; //flag to check if new data has arrived
void setup() {
Serial.begin(9600);
mySerial.begin(9600);
Serial.println("<Arduino is ready>");
mySerial.println("AT");
mySerial.println("AT+CMGF=1"); //text mode
mySerial.println("AT+CNMI=1,2,0,0,0");
mySerial.println("AT+CSQ"); //Check signal strength
while (Serial.available())
{
mySerial.write(Serial.read());//Forward what Serial received to Software Serial Port
}
while(mySerial.available())
{
Serial.write(mySerial.read());//Forward what Software Serial received to Serial Port
}
}
void loop() {
//code for checking sms
scanSMS();
//Print if a new data arrived
showNewData();
delay(25000);
}
void scanSMS() {
static boolean recvInProgress = false;
static byte ndx = 0;
char startMarker = '#'; //Start and end markers. Eg. SMS body will be sent as #status#
char endMarker = '#';
char rc;
while (Serial.available())
{
mySerial.write(Serial.read());//Forward what Serial received to Software Serial Port
}
while (mySerial.available() > 0 && newData == false) {
Serial.write(mySerial.read());//Forward what Software Serial received to Serial Port
rc = mySerial.read();
if (recvInProgress == true) {
if (rc != endMarker) {
receivedChars[ndx] = rc;
ndx++;
if (ndx >= numChars) {
ndx = numChars - 1;
}
}
else {
receivedChars[ndx] = '\0'; // terminate the string
recvInProgress = false;
ndx = 0;
newData = true;
}
}
else if (rc == startMarker) {
recvInProgress = true;
}
}
}
/*PRINT IF THERE IS A NEW DATA*/
void showNewData() {
if (newData == true) {
SendMessage(receivedChars);
newData = false;
}
}
/*SEND BACK WHATEVER SMS IS RECEIVED*/
void SendMessage(String receivedChars)
{
Serial.print("here");
mySerial.println("AT+CMGS=\"+xxxxxxxxxx\"\r"); // Replace x with mobile number
mySerial.println("Humidity Alert!");// The SMS text you want to send
mySerial.print(receivedChars);
mySerial.println((char)26);// ASCII code of CTRL+Z
}
默认设置为200。