Arduino i2c problem sending multiple bytes

I ran into a bit of a weird problem a little while back when using I2C on Arduinos.  I friend also had the problem recently so I figured maybe it was common enough that this post could help other people.  The problem occurs when you have the master request a certain number of bytes from the slave.  Except when the slave sends the bytes back, they all show up as -1 except for the last one.  Here is some example code and a workaround solution.

Continue reading “Arduino i2c problem sending multiple bytes”

Rotary Encoder on the ATtiny85 – Part 2

One of the most popular posts on my blog is this post about using rotary encoders on the attiny85.  Unfortunately that post is mostly things I tried that didn’t work.  A few months after writing that post I realized why it didn’t work and posted about that.  And finally, I’ve figured out the solution, which you can see below. Continue reading “Rotary Encoder on the ATtiny85 – Part 2”

Pin Change Interrupts on ATtiny85

Pin Change interrupts on the Arduino have eluded me for awhile so when I finally figured them out last week, I also started messing with Pin Change Interrupts on the ATtiny.  Unlike with the ATmega chips, examples are much harder to find for the ATtiny interrupts and even when you find them, I don’t think the quality is quite as good.  So here is a simple guide to working with Pin Change Interrupts on the ATtiny85. Continue reading “Pin Change Interrupts on ATtiny85”

Arduino Pin Change Interrupts

I recently needed to do some work with Pin Change Interrupts and it was a bit of a learning experience for me.  As it turns out, they’re actually pretty easy.  I’m posting this so that when I need to look it up in the future, I can easily find it and maybe I can help somebody else out too. Continue reading “Arduino Pin Change Interrupts”

AVR (& Arduino) Default ISR – Resetting Pin Change Interrupt Problem

I just got done wasting 10 very frustrating hours on a Interrupt Service Routine problem.  In this case it was a pin change interrupt that causes the chip/board to reset.  It turned out to be a simple capitalization error but luckily I also discovered some info about the AVR default ISR.  I wanted to post it here in case somebody accidentally found it useful.   Continue reading “AVR (& Arduino) Default ISR – Resetting Pin Change Interrupt Problem”

Nokia 5110 Screen – Photo to Bitmap Converter

The Nokia 5110 LCD screen is a nice little LCD sold by both Sparkfun and Adafruit.  I needed to work with one for my wireless weather station and wanted to use my logo instead of the Adafruit logo which comes in their library.  So I wrote a processing program to make creating images easier.

Nokia5110Screen Shot 2014-07-12 at 2.06.08 AM

Continue reading “Nokia 5110 Screen – Photo to Bitmap Converter”

Burn bootload to Arduino Mego without ISCP pins

This tutorial is pretty simple but it is worth a mention in case others with less experience get into a similar jam.  I was having trouble uploading some programs to my Arduino Mega so I decided to burn the bootloader again to see if that fixed the problem.  Unfortunately, I had chopped the ICSP headers off about a year ago when I didn’t really understand what they were used for and didn’t want them touching a shield I was putting on top.  Fortunately, there is a way around this.
Continue reading “Burn bootload to Arduino Mego without ISCP pins”

Programming an ATtiny85 with the AVRISP mkII

I previously covered a method of programming the ATtiny85 using an Arduino Duemilanove.  However, my Duemilanove board isn’t working at the moment and I need to work on a project so I decided to program it with an Atmel AVRISP mkII programmer.  Here are the simple steps, mostly so that I don’t have to lookup the pinouts online next time I need to do this. Continue reading “Programming an ATtiny85 with the AVRISP mkII”

Testing the range of the Xbee Pro 900

My master’s thesis is a hexakopter that captures weather data.  It stores this data locally but also sends it back to a base station on the ground using a series one Xbee Pro 900MHz.  I finally received my pair of Xbees last week (don’t you love slow purchasing departments?) and wanted to test the range of the wireless link. Continue reading “Testing the range of the Xbee Pro 900”