Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <Servo.h>
- Servo SV;
- #include <SoftwareSerial.h>
- int rxPin = 3;
- int txPin = 2;
- SoftwareSerial bluetooth(rxPin, txPin);
- int VALORE;
- int VAL1;
- void setup() {
- SV.attach(7);
- Serial.begin(9600); //Setta il baund per la trasmissione seriale
- bluetooth.begin(9600); //set baud rate
- int VALORE = 0;
- }
- void loop() {
- if (bluetooth.available()) {
- VALORE = bluetooth.read();
- Serial.println(VALORE );
- SV.write(VALORE );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement