добавлены комментарии по выбору пинов для разных плат. Для стартовых примеров добавлен ifdef для автоматического задания корректных выводов
This commit is contained in:
1 parent
f45757f13c
commit
53511ffbe2
33 files changed
+280
-169
No files matched your search
@@ -10,9 +10,9 @@
|
||||
Servo servo; // create an Servo class instance to control the servo
|
||||
|
||||
int pos = 0; // variable for storing servo position
|
||||
|
||||
int pin = 8; // P1_9 for Start/Elsomik
|
||||
void setup() {
|
||||
servo.attach(8); // connecting the servo drive to digital pin 8 (D8)
|
||||
servo.attach(pin); // connecting the servo drive to specified digital pin
|
||||
}
|
||||
|
||||
void loop() {
|
||||
|
||||
@@ -8,9 +8,9 @@
|
||||
#include <Servo.h>
|
||||
|
||||
Servo servo; // create an Servo class instance to control the servo
|
||||
|
||||
int pin = 8; // P1_9 for Start/Elsomik
|
||||
void setup() {
|
||||
servo.attach(8); // connecting the servo drive to digital pin 8 (D8)
|
||||
servo.attach(pin); // connecting the servo drive to specified digital pin
|
||||
}
|
||||
|
||||
void loop() {
|
||||
|
||||
@@ -8,12 +8,13 @@
|
||||
#include <Servo.h>
|
||||
|
||||
Servo servo; // create an Servo class instance to control the servo
|
||||
|
||||
int potpin = A0; // analog pin used to connect a potentiometer
|
||||
// analog pin used to connect a potentiometer
|
||||
int potpin = A0; // P1_5 for Start/Elsomik
|
||||
int val; // variable for reading the analog output value
|
||||
int pin = 8; // P1_9 for Start/Elsomik
|
||||
|
||||
void setup() {
|
||||
servo.attach(8); // connecting the servo drive to digital pin 8 (D8)
|
||||
servo.attach(pin); // connecting the servo drive to specified digital pin
|
||||
}
|
||||
|
||||
void loop() {
|
||||
|
||||
Reference in new issue
Block a user