The Adafruit ItsyBitsy (IB) is really a pretty cool little board. I picked one up a couple of months ago on a whim. It comes with CircuitPython preinstalled on it and it acts as an USB drive so you can carry all of your work with you. Very nice. It is powered with the Atmel SAMD51 chip and plenty of memory. 

Above is an example of how the ItsyBitsy appears in a MacOS Finder window. For all intent and purposes it look and acts like a USB drive. It has almost 2MB of storage on it. Personally I am sold that all I need is my little board, plug it in a computer and away I go working on my project(s). Adding libraries is as easy as dragging them into the lib folder on the CIrciutPy. For the project I did here, Adafruit has all of the libraries I need. 

For such a mighty little board, this project won't push it at all. My goal is to get to know the IBM4 and Circuitpython. I figured this would be a nice dipping of the toe in the water if you will. 

Putting it together

Tonight I started with the RTC. It is a DS3231 board that I had for one of my Raspberry Pi’s. Since it never got used with them, this seemed like a good purpose for it. It is an I2C device; I used a scanner to find the address which is 0x68. I grabbed the adafruit library for the RTC and installed it on the IB. This is as easy as dragging the file from my Mac over to the CircuitPy. There is some code to set the time on the RTC. You can see it below. It was straight forward. The only real issue I had was finding the pinout for the board. The headers cover the labels, but I was able to confirm that the pinout is 3v3, SDA, SCL, nc, GND. For now I just had it printing the date and time to the serial console. 

Before I go any further, here is the schematic I whipped up to keep myself on track (and my notes up to date).

I2C is as it is a bus that can communication with multiple devices. It also cuts down on the number of wires needed to communicate with a controller down to 2; the SDA and SCL. I like the explanation of I2C from CircuitBasics. 

Next is the screen, another I2C device. I checked on its’ address to make sure it didn’t conflict with the RTC. I knew it wouldn’t but no harm in double-checking. Its’ address is 0x3c. It seems that the library is limited right now. The text is pretty tiny. I am working on figuring out how to get something a little larger that I might be able to read. I was thinking of a slightly larger display with a larger font and using it. As is it is going to be a little hard to do. One step at a time. It didn’t take long at all before I had Hello World displayed on the screen. 

Lastly is the BME280. This one was giving me problems to no end. The i2c scanner would see it, but the script would not have it even when I tired to force the address. One error barked about a chip ID not being right. Huh, I am using the generic version not the Adafruit. I cracked open the library with BBEdit and tracked down where the address and ID were coded in. I changed both of them to match the board and it started working.

After that it was mashing the three together to get the data displayed on the screen. 

At the tone the time will be . . . 

And the temperature is. . .