Skip to content

Instantly share code, notes, and snippets.

@thejevans
Created May 11, 2017 21:42
Show Gist options
  • Save thejevans/4bd82638b3e9769de424975422b32b20 to your computer and use it in GitHub Desktop.
Save thejevans/4bd82638b3e9769de424975422b32b20 to your computer and use it in GitHub Desktop.
Workshop 2
Slide 3:
void setup() {
pinMode(6, OUTPUT);
}
void loop() {
int j = analogRead(1);
analogWrite(6, j/4);
}
Slide 4:
void setup() {
pinMode(6, OUTPUT);
Serial.begin(9600);
}
void loop() {
int j = analogRead(1);
analogWrite(6, j/4);
Serial.println(analogRead(0));
}
Slide 8:
void setup() {
pinMode(6, OUTPUT);
Serial.begin(9600);
}
void loop() {
int j = analogRead(1);
analogWrite(6, j/4);
Serial.println(analogRead(0));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment