geek in holidays – Arduino startup

Posted: April 4, 2015 in technical
Tags: , ,

So it seems that I am back on “blogging”. Long time no see, my friends 🙂 and thanks for all the messages I got in the meantime.

Most probably I won’t be able to keep up blogging as in the past (not enough time to do all the geeky stuff), but I will not abandon it anymore.

The past few days I’ve found out about the passing of a friend, one of the geekiest people I know, an elderly gentleman, who has spent most of his life in the search for knowledge (he was speaking 11 foreign languages), curiosities and geeky stuff (a BSD passionate and founder of the foundation behind EuroBSDCon). I was very sad to get the news from Gavin and Henning this week, posted via the OpenBSD lists.

RIP Paul!

So, given the fact that for the past few weeks I can only sleep till 2AM every night, with occasional nights when I can fall asleep somewhere close to the morning, I have decided to spend this time on something useful, rather than with thinking and worrying about purpose of life and ponies and butterflies. First thing at hand: my new Arduino kit.

First time playing with this toy, I’ve went through the Startup Guide, and made the lights blink, the buzzer go off etc. The ones I am going to use later on though are the following:

1. Distance detector

https://drive.google.com/file/d/0By4rOXj_UNlEdVZMVHBjb2tJOGs/view?usp=sharing

2. Light sensor

https://drive.google.com/file/d/0By4rOXj_UNlEVnpaaXJQRUQweVE/view?usp=sharing

3. Movement detector

https://drive.google.com/file/d/0By4rOXj_UNlETzN6aUhkcGhNZzQ/view?usp=sharing

4. Temperature sensor

https://drive.google.com/file/d/0By4rOXj_UNlEeUpaSHJiRTZOZ0k/view?usp=sharing

5. (for the future) Servo engine

https://drive.google.com/file/d/0By4rOXj_UNlET0FfMW90bkFRMUk/view?usp=sharing

Indeed, these are just playing around with the very basics, but at least now I get the logic of how this works, and the code itself looks a lot like C programming, with libraries you can include and work with (and have the Arduino board become unresponsive when the libraries folder has a different name than the .cpp file inside it).

https://drive.google.com/file/d/0By4rOXj_UNlEamhKOTluZllPVDA/view?usp=sharing

Aaah, the sweet smell of burned plastic when you placed the Temperature sensor backwards on the breadboard!! 😛

TemperatureSensor

Advertisements
Comments
  1. Welcome to the club 🙂

    Arduino = IDE forked from Processing/Wiring + [under the hood] avr-gcc/avr-g++ + avr-binutils + avr-libc + avrdude + ATmega328p + bootloader.

    The entirety of the Arduino-specific function (like pinMode() ) implementation is called a “core” and people have made “cores” for smaller things (like the ATtiny) and much, much larger things (such as ARM Cortex-M varieties [see libmaple, for a vivid example] and even full blown Cortex-A chips (pcDuino, BeagleBone etc.).

    The language is plain C++ “but you don’t have to” 😉 Keeping the avr-libc reference at hand is highly recommended, as well as the ATmega328p datasheet .PDF.

    If you have questions, feel free to ask!

  2. cristinacrow says:

    I wanna build the sticky light :D:D

    • Oh, I’m afraid that’s about two orders of magnitude above the raw computing power available in the ATmega328p. Maybe somebody like John Carmack (that can write sin/cos tables out of memory on a napkin while at lunch) will prove me wrong, but that’s my current assessment.

      You can use the Arduino to control the galvos (http://en.wikipedia.org/wiki/Galvanometer#Modern_uses) that steer the beam and you can probably use the same MCU to do light/dark detection for the point the laser is currently aimed at (assuming the photodiode’s optical path is parallel to the laser one and thus is auto-aimed by the galvos which point the laser).

      The output part (make the laser write stuff on the wall) is probably easy to achieve, assuming a finite size for the written text/drawing. Simple reflexes can probably be done in the Arduino itself, like “if you see black, move left” or “wobble around that place”.

      Mostly anything more complex (in realtime) which goes into computer vision domain (see OpenCV) is however too much for the Arduino. Bear in mind the ATmega328p doesn’t have an FPU, nor a DIV instruction, so anything that deals with curves will be very slow (in current day and age terms).

      Good luck!

      P.S. You may find the discussion in this project useful for steering the beam: https://marcan.st/blog/2010/11/openlase-open-realtime-laser-graphics/

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s