The past two weeks have been very busy with work. Most progress on the greenhouse has been made in the preparation and thinking department. Several design choices have been validated.
Although everything works like a charm on the Raspberry Pi, I've been looking at changing to the Beaglebone Black platform. Two 2x20 headers and a doublesided protoboard and a 2x5 header made a more permanent setup for my gateway.
The Beaglebone Black is a more powerful platform for the greenhouse. I am thinking about creating a "sandbox" using iPython. Building several classes to describe the greenhouse should make it possible to make an experimentation platform.
In a more definitive form I could switch back to the Raspberry Pi. But for now I will develop using the Beaglebone Black.
Although the G2553 launchpad provides just enough functionality, the internal memory becomes cramped when using strings for communication. As I am thinking of a sort of JSON-like protocol with acknowledgements, space is running out quickly.
I have several Stellaris/Tiva launchpads at home. These launchpads use a ARM Cortex M4F (with floating point) processor with ample flash memory, speed, SRAM and I/O pins.
As I have been using Energia for the original code, porting is quite easy. The Stellaris/Tiva launchpad has multiple SPI and I2C modules which need to be selected by the
Protoboards and d'Oh.
Having soldered the protoboard for the Beagleboard and a protoboard containing all environmental sensors for the Launchpad, a more definitive setup has been made.
Time to work a bit more on the software side. The original sketch reads out the different sensors and sends their values periodically to the gateway. There is no bidirectional communication.
So the first step is to try bidirectional communication. Using radio.startListening() and radio.stopListening() communication is possible. Switching between the transmitting and listening state should make bidirectional communication possible.
However, the first experiments yield no results. As soon as I switch between the two states no bit is received at the gateway. Two hours of mildly cursing and trying different routes I found the culprit.
The NRF24L01+ module uses the CE pin to switch between the two modes. This pin has been mapped to P8_23, but with the Beaglebone Black this pin has been mapped to the eMMC flash memory. Switching the pin to P8_19 saves the day!