Asynchronous Serial Communication

In a previous post, How To Integrate Arduino With Unity, we have shown how data can be sent and received through the serial port. The main problem encountered was dealing with the latency and the delays that communicating across different devices introduces. The solution proposed in that tutorial used a coroutine; decoupling the device communication from the game logic attenuates the problem, but it doesn’t remove it. The main problem is that, despite the name, Unity coroutines are not really executed in parallel with the rest of the game. Unity, by design, is not thread safe. This means that true parallelism is intentionally avoided by the engine, as it could result in race conditions. To solve the problem of the communication between Unity and Arduino, once and for all, we need actual threads.

Continue reading

How To Destroy an Arduino Board

Developers that are approaching electronics for the very first time have a lesson to learn; and this usually happens the hard way. Wiring a circuit incorrectly, and you can potentially destroy your Arduino board. When it comes to mistakes, hardware is generally not as forgiving as software. This tutorial shows the most common ways you can accidentally destroy an Arduino board; and how to avoid it.

Continue reading

How to Build a Heater with Arduino – Part 2

This is the second part of a tutorial that will teach you how to build a portable heating device with Arduino. In this post, we will explore how to control a heating resistor with Arduino. This allows to keep your setup at the desired temperature.

Continue reading

How to Build a Heater with Arduino – Part 1

This tutorial will explain how to build a portable heating device with Arduino. If you’re an amateur astronomer, this can be the perfect way to prevent the formation of dew on your mirrors and lenses. In my specific case, I’ve built one of those mini heaters to warm up a formicarium. Whether it’s for your feet or for your cold-blooded pets, building a heater is easy and cheap.

The second part of this tutorial (How to Build a Heater with Arduino – Part 2) will explain how to use a temperature sensor to maintain a desired temperature. Continue reading