Skip to content

Instantly share code, notes, and snippets.

View robotjoosen's full-sized avatar
🤖
Beep Boop Beep

Roald Joosen robotjoosen

🤖
Beep Boop Beep
View GitHub Profile
@robotjoosen
robotjoosen / simple-robot.ino
Last active January 26, 2019 21:33
Simple robot code used for the coding of a simple robot part of a workshop.
//Laad de servo bibliotheek zodat je het zelf niet hoeft te schrijven.
#include <Servo.h>
//IR_SENSOR
static int ir_sensor = 0; //Analoge poort A0
static int ir_threshold = 400; //0-1023 [0 = 0v / 1023 = 5v]
int ir_value;
//SERVO
static int servo_pin_left = 2; //Digital pin 2