d'abord on aurait besoin d'un schéma :
composants:
- modue blutooth hc-05.
- led
- Arduino
- Résistances(question de sécurité)
En suite vous pouvez techerger depuis play store l'app : BlueControl for arduino
Et après tu programme l'arduino grace à ce programme :
---------------------------------------void setup() {Serial.begin(9600); pinMode(5, OUTPUT); // put your setup code here, to run once: }
void loop() { // put your main code here, to run repeatedly: if(Serial.available()>0) { char data= Serial.read(); // reading the data received from the bluetooth module switch(data) { case 'A': digitalWrite(5, HIGH);break; // when a is pressed on the app on your smart phone case 'D': digitalWrite(5, LOW);break; // when d is pressed on the app on your smart phone default : break; } Serial.println(data); } delay(50);}----------------------------------
⛔ si vous arrivez a un problème n'hésiter pas de me contacter sur l'un des réseaux sociaux.
إرسال تعليق