I finally got back to working on the CE Header and the sensor board. I simply hand-soldered the parts and all went smoothly.
I had to work around the fact that I did not have socket connectors large enough to span the 14 pins on the long side of the teensy. I opted to just directly solder the teensy to the teensy adapter - after what could possibly go wrong?
Even so, I was a bit cautious with just adding the sensor board before suitable testing. I was able to test a couple of the systems on the Sensor board individually. The main one to test was the I²C interface. For that I could use the gear I already have - an USB to I²C adapter from ELV which I have used on another project.
I was pleased to find that I could communicate directly with the temperature sensor without any issues.
I verified the operation of the Light Dependant Resistor (LDR) but I was not convinced on the selection of resistors I chose. I then turned to Falstad/circuit
to verify what could be the desired values. Since in referring to some Teensy references, anything above 3.3V (and must be below 5V) will be clipped. So only needed to sense a voltage between 0 and 3.3V. For the LDR I have chosen, I only needed a 10kΩ on the top-side and a 0Ω on the bottom side of the LDR.
The shift register was trickier to check on its own so it was time to connect the Sensor Board to the Teensy.
The Shift register worked fine as did reading the analog value for the LDR to the point I could have a bit of fun and code the LEDs to flicker based on the value from the LDR to create a very
rudimentary motion detector.
Ploughing though the Teensy adapter and Sensor board, I did not pick up on Teensy Wire Library
. I took it for granted that the pull up resistors would already be applied on the teensy, like they are on the Raspberry Pi for instance. The ELV USB-I²C adapter obviously has the pull-ups. the up-shot was that, to the Teensy, the temperature sensor was invisible. In hindsight, this makes sense. This leaves the Teensyopen to be implemented as a Master or a Slave.
Since I had soldered the Teensy to the adapter, I had space to add the required 4.7kΩ resistors and it all worked fine. I could then implement a thermometer that outputs the temperature in binary through the shift register.