setup:

  • get a Laptop/PC/VirtualMachine with Debian 9 64Bit and install Arduino IDE 64Bit for Linux
    • one could use OSX, but sorry, no Windows is not an option X-D
  • attach Arduino with a USB-Printer-Cable like here.
  • might need to fix some access right problems of USB serial port /dev/ttyACM0
chmod a+rw /dev/ttyACM0

requirements:

blinken_led_v1:

// this program will make LED blink in 50ms durations
// tested on: Arduino MEGA 2560
// setup: attach LED to Digital Port 24+GND

const int LEDdelay = 50; // in ms

void setup() {
  // put your setup code here, to run once:
  pinMode(24, OUTPUT); // define PIN 24 as output pin
}

void loop() {
  // put your main code here, to run repeatedly:
  digitalWrite(24, HIGH); // switch PIN 24 on/high/voltage
  delay(LEDdelay); // wait for x ms
  digitalWrite(24, LOW); // switch PIN 24 off/low/no voltage
  delay(LEDdelay); // wait for x ms
}

blinken_led_v2:

// about:     this program will make LED blink fast then slower and slower ;)
// tested on: Arduino MEGA 2560
// setup:     attach LED to Digital Port 24+GND

// put your setup code here, to run once:
void setup() {
  pinMode(24, OUTPUT); // define PIN 24 as output pin
}

// put your main code here, to run repeatedly:
void loop() {
  for(int i=0;i<300;){
    digitalWrite(24, HIGH); // switch PIN 24 on/high/voltage
    delay(i); // wait for x ms
    digitalWrite(24, LOW); // switch PIN 24 off/low/no voltage
    delay(i); // wait for x ms
    i=i+5;
  }
}

if the led is blinking:

congratulations! 🙂

if not: try to „turn LED around“ (pull out LED and swap PINs), change polarization, change + to – .

if the led is blinking then:

congratulations! 🙂

other fun projects:

control Minecraft: Pi Edition using a apples X-D

why? why not! X-D

https://learn.adafruit.com/capacitive-touch-sensors-on-the-raspberry-pi/overview

admin