#include "SoftwareSerial.h" // to communicate in serial const int LED = 8; const int TX = A0; const int RX = A1; SoftwareSerial mySerial (RX, TX); boolean ledState = false; //to declare the state of the LED, and false because it needs a default state value void setup() { // put your setup code here, to run once: pinMode(LED, OUTPUT); pinMode(TX, OUTPUT); pinMode(RX, INPUT); mySerial.begin(9600); // bluetooth serial } void loop() { // put your main code here, to run repeatedly: if (mySerial.available()){ int serialValue = mySerial.read(); if (serialValue == '1'){ mySerial.println("led ON"); digitalWrite(LED, HIGH); } else{ mySerial.println("led OFF"); digitalWrite(LED, LOW); } mySerial.println("je suis là"); } }