Найти в Дзене
ПРОСТЕЙШИЙ КОД НА АРДУИНО
И так, сегодня я вам покажу простейший код на ардуино для того чтобы ключить светодиод Сам код: #include <Servo.h> // Minimum value servo should be rotated to, for the buzzer to buzz #define BuzzerRotationThreshold 2 // Setting up ports so we don't use a lotta numbers #define BuzzerPort 8 #define PotentiometerPort A2 #define ServoPort 13 Servo servo; void setup() { servo.attach(ServoPort); // Beginning servo connection servo.write(0); // Starting with servo at 0 degrees pinMode(PotentiometerPort, INPUT); } // Rotation of servos, cached: long int servoRotate = 0; long int previousServoRotate...
3 года назад