One of the new “toys” I bought for Charlie is an Adafruit hardware RTC module for the Pi. They come in two varieties, ones with female headers that push down on the first six GPIO pins, and ones with open solder holes that can be placed where convenient and wired to the i2c buss.
There are also “plain vanilla” and “high precision” varieties.
The main reason I want to do this is so that - among other things - my logs make sense. As it is, especially in DexterOS, the dates/times in the logs are meaningless which makes the data virtually impossible to analyze in any meaningful way.
What i2c addresses are used by the GoPiGo and it’s associated add-on boards, such as the IMU board or the distance sensor? The Adafruit hardware RTC boards use 0x68 as their i2c address - will that conflict with anything on the GoPiGo?
Though I am sure I could make this work in Raspbian for Robots, has anyone tried implementing a hardware RTC in DexterOS?
# The I2C address is software programmable (volatile), and defaults to 0x52 >> 1 = 0x29.
# __init__ changes the address (default to 0x54 >> 1 = 0x2A) to prevent conflicts.
ADDRESS = ADDRESS_DEFAULT
def __init__(self, address = 0x2A, timeout = 0.5, bus = "RPI_1SW"):
Thank you for mentioning I2C address 0x68. I thought I recognized that address, it turns out to be the same address the MPU-9250 IMU uses. I bought the 9250 IMU because it is $8.50 and received a slightly better review than the BNO055 of the DI IMU, but I had a typo (0x6B) instead of 0x68 that I have been chasing for an hour this morning. To save $20, I will probably have to spend a month writing the GoPiGo3 interface.