Skip to content
Snippets Groups Projects
Commit 895aa035 authored by Dhanushree Prakash's avatar Dhanushree Prakash
Browse files

send arduino file

parent e821c52e
No related branches found
No related tags found
No related merge requests found
Pipeline #313727 passed
#include <SoftwareSerial.h>
SoftwareSerial sserial(31,30); // receive pin=10, transmit pin=11
const int pause= 300;
void setup() {
Serial.begin(9600); // start serial connection
sserial.begin(9600); // start serial connection
pinMode(30, OUTPUT);
pinMode(31, INPUT);
}
void loop() {
// send
Serial.write(analogRead(A2));
delay (pause);
sserial.write(digitalRead(4)); // Tact switch (used in the corresponding tutorial) is inverted. Therefore, inverted status is sent to other Arduino
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment