Last active
January 6, 2016 15:49
-
-
Save hackolite/f9337464e2d3e86c02fb to your computer and use it in GitHub Desktop.
This file contains 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
char NOMBRE[10] = "SENS01"; // le nom du module | |
char BPS = '4'; // 1=1200 , 2=2400, 3=4800, 4=9600, 5=19200, 6=38400, 7=57600, 8=115200 | |
char PASS[10] = "1234"; // le mot de passe | |
void setup() | |
{ | |
Serial.begin(9600); | |
pinMode(13,OUTPUT); | |
digitalWrite(13,HIGH); | |
delay(10000); | |
digitalWrite(13,LOW); | |
Serial.print("AT"); | |
delay(1000); | |
Serial.print("AT+NAME"); | |
Serial.print(NOMBRE); | |
delay(1000); | |
Serial.print("AT+BAUD"); | |
Serial.print(BPS); | |
delay(1000); | |
Serial.print("AT+PIN"); | |
Serial.print(PASS); | |
delay(1000); | |
} | |
void loop() | |
{ | |
int mq3_value = analogRead(A0); | |
Serial.print(" {'luminosity': "); | |
Serial.print(mq3_value); | |
Serial.println("}"); | |
delay(500); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment