Init commit with many years of arduino sketches and projects. I dont know if the esp8266 includes much, but there are also libraries. I hope they dont have crazy automatic versioning through the Arduino IDE.

This commit is contained in:
2019-05-30 23:41:53 +02:00
parent 2d047634f2
commit 6c84b31f2c
1480 changed files with 198581 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
#include <Servo.h>
Servo myservo;
int potpin = 0;
int potReading;
int photocellPin = 1;
int photocellReading;
void setup()
{
myservo.attach(9);
}
void loop()
{
potReading = analogRead(potpin);
potReading = map(potReading, 0, 1023, 0, 179);
myservo.write(potReading);
photocellReading = analogRead(photocellPin);
int thisPitch = map(photocellReading, 1, 1000, 120, 1500);
tone(8, thisPitch, 10);
delay(1);
}