Just finished writing a small C++ class to work with multiple HC-RS04 sonar transducers with a non-blocking way with the NewPing Library.
In this exact code I connected two sensors, but you can add as many as you like.
To add new sonars, just create a new instance of it adding the echo and trigger pins.
Here is an example with some NeoPixels, just for fun:
This week I had to interface two accelerometers (adafruit MMA8451 breakout boards) into one Arduino board.
On Adafruits website, they write that you can address the sensors with 0x1C by adding a pull-down resistor on the “A” pin, or 0x1D by connecting the “3Vo” to a 3V3 source. What they don’t tell is how to use them both at the same time, which gets clear once you take a look at the Adafruit_MMA8451 class within the library file Adafruit_MMA8451.h.
Have you heard of the Arduino? Its a small but powerful micro-controller that can be used to create many amazing things. An Arduino can be used to sense its own environment, connect and communicate with the Internet, manipulate devices around it, send messages, and much much more. Last year, over 700,000 hobbyists were using and contributing to the Arduino environment.
This course is designed to take you from 0 to 100 with Arduino in less than an hour. At the end of the course, you’ll be fully familiarized with Arduino and ready to build your own applications and devices. Ideally, this course is for beginners who want to get their toes wet with the Arduino system but those already familiar with Arduino can still learn from the techniques used in this course.
What you’ll learn in this course:
– How to setup the Arduino software and start outputting code
– How to understand and write code that your Arduino can understand
– How to setup Serial communication
– How to use a breadboard, and RGB sensor, and a LED Pin.
– How to create a variety of functions that interact with your Arduino
– How to create a device that detects your rooms temperature and changes colors accordingly.
The AD5204 is a Digital Potentiometer with four internal 10kΩ, 50kΩ or 100kΩ potentiometers. It’s a 8 bits chip which means it has 2^8 = 256 steps from 0Ω to 100kΩ. It can be easily controlled by any microcontroller as it uses a Serial Peripheral Interface Bus (SPI).
I was working on a project where I needed to use some of those AD5204, so I developed a tiny breakout board in order to be able to prototype it using a SMD chip on the breadboard.
Now I’m sharing the Eagle Cad files, so whenever you need to use this chip, you can make some breakout boards with OSH PARK and use it with your projects.
Below you can find an Arduino code example along with useful links.
Hope this can be useful for you!
Well, since last September I’ve been living in Italy, I guess that’s the reason why I haven’t updated the website in a while, but I will make up to you, good things to come!!!
I moved to Milan on 16th of September 2011 for a “Erasmus” Program (it’s a exchange program, but here, saying Erasmus is easy to make people understand) at the Politecnico di Milano, which is one of the biggest universities in the fields of Engineering of Italy.
Today I was having fun with a MacroLenses and decided to take some pictures of my Arduino Uno board, I got quite happy with the results that I am using them as wallpaper, and I decided to share with you.
You can find the original file ≈ 15mb, also 1920×1200, 1680×1050 and 1280×800. Continue reading →
I got my Dotklok up and running some days ago, I am really enjoying it on my room.
But I want to do more with it. Too bad right now I don’t have much time to play with electronics and build cool things.
Anyway, today I decided to spend some time learning the Dotklok’s code and add a temperature sensor to it. The result was really cool, and now I am sharing the bit of code I added to the clock. Continue reading →