ESP8266 ESP-01 Programming Adapter

I started to invetigate a little bit in the ESP8266 ESP-01 WiFi board and I hate to have loose wires cluttering my workspace… I demand a cleaner one, hehe…

So I decided to build a little breadboard programming adapter. This is what I have come up with so far:

I uploaded the blink sketch and Continue Reading →

10. May 2018 by Marius
Categories: Arduino, Projects | Tags: , , , , | Leave a comment

LEDs For Beginners – Simple Wiring and Calculation

One of the first projects you probably want to make with some electronic components is to make something glow. Glowing stuff is allways nice. 😉 Maybe you allready fried some LEDs by connecting them directly to a power source… At least I did when I began exploring electronics. Ups, the LED is gone… 😉

“A LED and a battery going to a pub…”

A very simple LED circuit looks like this:

Simple LED Circuit

You allways need a resistor before the LED because if there is none the current, that flows will destroy the LED.
Since life isn’t that simple there are ton of different resistor values Continue Reading →

05. February 2018 by Marius
Categories: Tutorials | Tags: , , , , | Leave a comment

Write an integer to the Arduino EEPROM

Today I faced the problem that I wanted to write an int (integer) to the integrated Arduino EEPROM. The Atmel ATMega328 chip has an address space of 0-1023 and each of these slots can save 1-Byte or 8-Bit (which is the same btw).

Now an int is a number that goes from −32.768 to 32.767 (or 65.535 if unsigned) and needs 2 Bytes for storage because this range of values can be decoded in 2-Bytes or 16-Bits (eg. 1100 0000 0101 0001 = 49.233)

The thing is that the standart Arduino EEPROM library just writes 1 Byte (values from 0-255 or a number that can be decoded in 8-Bit (1-Byte) eg. “0000 0110”) to an address specified.

Here is a little illustration how the EEPROM (or our little problem) “looks” like:

Write an Integer to the EEPROM

So I did some research and found some solutions. All you need to do is to do some bit-shifting magic and voilá you can decompose the int to its Continue Reading →

11. December 2016 by Marius
Categories: Arduino, Programming | Tags: , , | Leave a comment

How to avoid delay() – create a custom Arduino class – Part 2

In the previous blog post we learned how to avoid delay() if necessary. It would be very convenient when we are able to add a layer of abstraction to this code so when can easily reuse it if we need it.

Before we can begin creating a custom Arduino class, we need to create these files:

  • SCAsyncTimer.cpp ( = the implementation, this is where the most of the code goes)
  • SCAsyncTimer.h ( = the header, this is some kind of a “table of contents” for our class)
  • keywords.txt ( = optional the keywords, here we can specify the keywords which then get colored in the IDE)

Create these files either in your sketch directory (so its only available in this sketch – restart the IDE so the Continue Reading →

15. November 2016 by Marius
Categories: Arduino, Programming, Tutorials | Tags: , , , | 1 comment

Arduino and how to avoid delay() – Part 1

The main problem with using delay() in your Arduino sketch is simply: it will block the whole system for the amount of time you specified. Since your microprocessor is pretty fast compared to most of the delay() time he is very bored, gets lonely and depressive if you do not care for him…

While that could be okay for most circumstances and projects, when going Continue Reading →

14. November 2016 by Marius
Categories: Arduino, Programming, Tutorials | Tags: , , | 1 comment

Arduino Mood Lamp / LED Cube

LEDCube_005

I wanted to build an Arduino mood lamp that worked without any buttons and is customizeable for any mood / light situation. So I did a little research and found about the posibility to trigger input on the Arduino with something called “capacitive sensing” and began to design a lamp with 3 input sides which are separate Continue Reading →

09. November 2016 by Marius
Categories: Arduino, Projects | Tags: , , , , , , , | Leave a comment

Freeware OLED Pixel generation software “OLED Pixxler”

OLED Pixxler

I started a little Arduino project involving an OLED (SSD1306) display using the u8glib library. I faced the issue that I wanted a few custom pixel / bitmaps for the project and also wanted to propably animate the grafics… and its very inconvenient to write these little pixel fellas by hand converting bitmaps to hex representation not Continue Reading →

29. October 2016 by Marius
Categories: Arduino, Programming, Software | Tags: , , | 1 comment

Arduino Mini CNC Machine

010_Title

To be honest: in the beginning I had no idea that there is such a thing like CNC machines. CNC stands for “Computer Numerical Control” and there are a ton of different machines out there ranging from 3 up to 5 axis types. But at the moment I realized that I could plan and build things virtually and let the machine do the ultra tiny Continue Reading →

24. May 2016 by Marius
Categories: Arduino, Projects | Tags: , , , | 1 comment

Interface a cheap OLED (SSD1306) from eBay with an Arduino

ssd1306_01

There are a couple of cheap OLED displays available on eBay and I really struggled to get them to work with the Arduino. Some of them have the manufacturer “Heltec” printed on the circuitboard and most of them Continue Reading →

25. December 2015 by Marius
Categories: Arduino, Tutorials | Tags: , , , , | Leave a comment

C++ Template Arduino investigation

I tried to simplify and refactor some of my code for a new Arduino project lastly and came up with some interessting programming concepts in C/C++ I never heard of before my Arduino adventures.

The Problem

At first I wanted to get rid of my String class coding. Its evil. As far as I know its not very efficient to work with in the Arduino (C/C++) programming environment especially in embedded systems like the small ATMegas and ATTinies. Its slow and allocates dynamic memory which could lead to memory heap fragmentation etc.. Short: they suck! 😉 Better use Chars but unfortunately they arent like the fluffy little Strings, they are spikey hedgehogs… Since Chars arent that friendly like Strings with all theire nice methods I needed to write some convenience methods by my own.

After a very nerdy weekend in my nerd cave, some experimentation and asking questions in the Arduino forum (best forum and community _ever_ 🙂 ) I learned Continue Reading →

26. November 2014 by Marius
Categories: Arduino, Programming | Tags: , | Leave a comment

← Older posts