Category: Hack

Quick fix for an annoying problem

Replacing the Wire Library—Sometimes

The featured picture of this blog post is by user18526052 on Freepik.

The Wire library is the one that connects your Arduino to sensors and actuators that communicate using the I2C protocol. Unfortunately, this library has a lot of shortcomings, and often you want to replace it with a different I2C library. Replacing the Wire library on a per-sketch basis turns out to be more complicated than one would expect. In this blog post, I describe an easy way to accomplish that.

Continue reading

Is any Input Available?

The featured image of this post is by rawpixel.com – de.freepik.com

The SoftwareSerial class has the available() method, which returns the number of characters that have been already received but not yet read. This is very similar to what the standard Serial.available() method offers. There is an interesting difference, though. A call to SoftwareSerial.available() is significantly slower than a call to Serial.available(). We will look for the deeper reason for this strange behavior and I will show you three ways how to fix it.

EDIT: The problem will vanish with Arduino version 1.8.17

Continue reading

Pimp Your Pro Mini

The Arduino Pro Mini is a very minimalistic Arduino board with a small footprint. For this reason, it is an ideal candidate for being used as the target board in a battery-operated system. In this blog post I’ll show you how to minimize power consumption and how to burn a new bootloader that saves flash memory, allows debugging, and fixes an annoying WDT bug.

Continue reading

I’m Sorry, Dave, I Can’t do That

The featured image of this blog post has been created by Cryteria, CC BY 3.0, Link

Gdb, the GNU debugger, is probably the most used open source debugger for embedded systems. The AVR version of GDB on the Mac is unfortunately not very cooperative. If you try to read an elf file, you get the following funny message (reminding us of HAL9000):

I’m sorry, Dave, I can’t do that. Symbol format `elf32-avr’ unknown.

But with the right homebrew formula, one can teach GDB some new tricks …

EDIT: The problem has been solved by the homebrew maintainers.

Continue reading

Copyright © 2024 Arduino Craft Corner

Theme by Anders NorenUp ↑