Neopixels with the SAMD10

The SAMD10 is a Cortex M0 ARM chip that comes in an SOIC format. This makes it easier to solder and particularly attractive for small applications, since they are cheap (<$1!). The WS2812b, or the Neopixel, is an RGB LED that uses one data line to display 255 x 255 x 255 different colours/intensities. In this project, I managed to get the protocol to work on the SAMD10 chip. What does it do? It is a protocol to light a string of Neopixel RGB LEDs in C. ...

June 15, 2018 · 7 min

Creating an Access Point (11)

Now that you have a little bit of experience with using the WiFi on the ESP8266, we’ll now set it up as its own access point. This makes it useful if you’re running the ESP8266 as a standalone device, perhaps collecting data on the temperature or monitoring some sensor. It makes it easy to access the ESP8266, which might be placed in a hard to reach location. First off, the library that we need: ...

June 6, 2018 · 2 min

How to stream data from Arduino to Android with the JDY-08

The JDY-08 is a tiny Bluetooth module that is really cheap and comes with everything on board. It is a easy and quick addition to existing Arduino projects to give them a little wireless magic. It is better than the HM-11/HC-05 boards because it uses BLE, which has lower energy consumption, takes up less space, and is still able to stream data transparently. This is a description of how to set up the JDY-08 to stream data from Arduino to Android without installing alternative firmware. It uses the default configuration that ships with the module. ...

June 3, 2018 · 7 min

PID Autotuning: A practical example

PID can be a real pain to tune. This is especially true if you are dealing with inherently unstable systems like a quadcopter. Ask anyone who has tuned a quadcopter manually. It is a very gruelling process that tests your patience and sanity. I remember seeing an improvement in performance as we tuned the code, only to discover that we were compiling the wrong piece of code. It is even worse if you have no idea where the target value should be. ...

May 16, 2018 · 3 min

Arduino LED strip shield

Ah the amazing LED strip. I’ve used it to build so many fun projects, from the Sunrise Morning Alarm. This can probably be seen as the next level of development in my projects. I wanted something that could be used easily to connect to LED strips to power and animate them, and a couple of other components that I usually would like to have in my LED projects, such as a radio and a real-time clock (RTC). ...

March 29, 2018 · 3 min

Spring Projects, 2018

Spring! A great time to get started on new projects, now that I won’t actually freeze the moment I step outside, I can also start embarking on outdoors projects. Tiva TM4C123 The Tiva TM4C123 is a very capable chip! We started using this in class and I really like how well documented Texas Instruments is. Datasheets and official examples work amazingly well. The only quibble I have is that searching through the examples to find a right one can be a hassle, especially if I just want to simply reference an example of how to toggle a pin. I really started to appreciate good documentation when I picked up the Beaglebone Pocket and tried to look up the software reference to program in C, there simply wasn’t any! All that was provided was a simple copy-and-paste example to blink an LED. The material didn’t point to any progression, or other examples, which I found kind of surprising. Documentation is sparse, and relies on third parties to write “unofficial” guides. I guess maybe that’s why Arduino/Raspberry Pi parings are so common instead of the Beaglebone. ...

March 28, 2018 · 5 min

Moving from Arduino to ARM

Moving from Arduino to ARM can be a frightening thing! The IDEs out there are more often intimidating because they bristle with features. For someone coming from Arduino where there was only really five buttons you could press in the IDE, this change is somewhat like moving from a car to an airplane. Atmel I first tried Atmel Studio because they are closely linked to Arduino, but the only other time I’ve had occasion to use it was to upload Arduino bootloader code onto SAMD21 chips. ...

February 28, 2018 · 5 min

Building a wireless controller

Let’s build an Arduino wireless controller in a Wii Nunchuk 3D-printed case with an nRF24L01! Motivaton I had a few joysticks lying around and I wondered if I could find a use for them. I was recently experimenting with nRF24l01 radio chips and they seem to be the most reliable way to send small packets of information wirelessly. I prefer them over the 433Mhz radios which I found to be too unreliable even from the distance of 1m. ...

February 7, 2018 · 3 min

Command for making GIFs on Linux

Making GIFs on a Linux computer requires you to jump through a few hoops, after a few hours of experimentation, this is my solution. Of course, you can also use an online service. ffmpeg -ss [start] -i input.mp4 -t [duration] -vf scale=280:-1 -r 15 -f image2pipe -vcodec ppm - | convert -delay 5 -loop 0 - output.gif The time should be set in the following format: hh:mm:ss for example, 00:12:31. ...

February 1, 2018 · 1 min

Data types, pointers, and a pickle? (14)

When programming in Arduino, you might have occasion to go beyond the standard datatypes of int and String. Data Types You might have noticed that if you did the following: int count = 5; int groups = 2; Serial.println(count/groups); Serial would have printed 3. This can be a head-scratcher, especially since we never had the occasion to use other data types. A data type refers to what the data can represent. This primarily has to do with int, which cannot represent decimal points. The solution is to use a float which is another data type, except that now it can handle floating point operations. For example, if we changed the example above a little: ...

January 24, 2018 · 6 min