Tag Archives: C++

ATmega328 powers open source WatchDuino

Watch-a got on your wrist?

The WatchDuino is an open source project that combines inexpensive electronic parts with complex Arduino (C++) code.

Key project components include Atmel’s versatile ATmega328 microcontroller (MCU), a crystal oscillator, LiPo battery and Nokia’s 5110 LCD screen.

“WatchDuino is not only programmable, it’s fully hackable from hardware to software. You can build your own out of [inexpensive] components [available] at a local electronics store,” a WatchDuino rep explained.

“[Plus], you have the full source code of the watch’s operative system at your disposal. The ability to build the whole thing from scratch and being able to hack at every level of it will greatly appeal to electronics hobbyists and Makers.”

Currently, primary WatchDuino features include:


Time and date (analog and digital output)
  • Alarm / countdown (with custom music)
  • Games (Pong & Snake)
  • Rechargeable battery (via USB) and meter
  • Low-battery mode (lasts up to two years with a 240mAh battery)
  • Integrated screen light
  • Compact design
  • Framework-like architecture to easily program custom screens

On the software side, the WatchDuino can be programmed via two methods: hacking the system itself or simply customizing various features and apps.

“Since WatchDuino’s software is open source, you have the full source code at your disposal to make any modifications you like,” the rep added.

The WatchDuino will likely hit Kickstarter at some point in the near future as a fully assembled device. In the meantime, you can check out the project’s official page here.

Dispelling Arduino myths with James Lewis

James Lewis has spent the past 6 years writing code for Atmel-based Arduino boards. Recently, the engineer noticed a “trend of myths” about the boards and decided to author a detailed blog post to set the record straight.

The first myth? Arduino uses its own language. Not so, writes Lewis.

“While it is true that the structure of an Arduino sketch looks unique, it is really just C++ with a tiny bit of preprocessing,” he explains. “Users writing ‘Arduino Code’ are actually writing C++ with, what I call, the Arduino Library.  Functions like digitalWrite() are just that, C++ functions.”

The next myth? Pin 13 has a resistor. According to Lewis, countless beginners have been lulled into this trap, even though only the very first Arduino board was fitted with an LED and series resistor on Pin 13.

“That’s the only board which did,” he emphasizes. “So you should never never never connect a LED to Pin 13, without a resistor!”

Myth number three revolves around the mistaken notion that commercial products don’t use Arduino. As Lewis notes, Arduino is a prototyping platform.

“You aren’t going to ship an Uno with every product. You might, however, develop a product with an Arduino and embed Atmel’s ATmega328 inside of it,” he says.“Or, more likely, you’ll prototype the idea, run it through a crowd funding effort and then redesign. There are plenty of products out there that started with an Arduino in the early stages. Ever hear of 3D printers?”

Myth number four – analogWrite() is analog!? Remember, with the exception of the Due, Arduino boards do not output “analog” signals. PWM signals are actually digital signals – where one changes the length of time between the “on” and “off” states.

Last, but certainly not least, is the topic of header spacing.

“Spacing between pins 7 and 8 isn’t 0.1,″  [although] at one point the Arduino web site had this in the FAQ as an ‘eleventh hour’ mistake,” Lewis writes. “Then there was the explanation that it prevented shields being plugged in backwards. Now, I’m not sure if it was intentional, but it is true that a benefit of the spacing is that you can’t plug in a shield backwards.”

According to Lewis, one perceived downside to this decision is that it makes the board difficult to plug into a breadboard, or a shield into a breadboard.  
However, he concludes, magic jumper wires do exist which solve this “problem.”