Space Kit Expansion Collection #1566


#1

This is a discussion for the Space Kit Expansion Collection Guide. Feel free to connect with the Learning Team here, or to discuss experiment tips, ask questions, leave comments or suggest experiment variations here.
expansioncollectiontn


#2

I successfully completed the exercises with the Expansion Collection using the Seeeduino board. I discover several problems with the RTC board. Attempting to compile with the web-based IDE returned the following error:

sketch.ino:3:20: fatal error: RTClib.h: No such file or directory
#include <RTClib.h>
^
compilation terminated.

I went to the Adafruit website and downloaded the library into my PC-based IDE. That compiled but still didn’t work – the unix time value remained unchanged.

Comparing your code to the Adafruit code, I changed 4th line from" RTC_DS1307 RTC" to “RTC_PCF8523 RTC” and that corrected the problem. There is also a minor, non-consequential typo on line 12 – the baud rate should be 9600, not 9700.

Regards,
Fredric


#3

I believe your connection diagrams for the serial input and output for the redboard are incorrect on page https://ehub.ardusat.com/experiments/1566 . Instead of using pins 8 and 9, you should use pin 0 for receive and pin 1 for transmit.


#4

This is a great observation and question!!

You are absolutely correct that pin 0 & 1 can be used for TX and RX (Transmit and Receive). You could use these pins 0 & 1 instead of pins 8 & 9. The big gotcha when using the hardware RX/TX pins on an Arduino is that when you have wires in pin 0 & 1 this will prevent the USB serial port from be able to be used for flashing a new program/sketch on the board.

We utilize a function called Software Serial that allows us to mirror RX/TX pins to another pair of Digital pins. Here is the command that mirrors RX/TX to pins 8/9 .

ArdusatSerial serialConnection(SERIAL_MODE_HARDWARE_AND_SOFTWARE, 8, 9);

This allows you to load code without needed to unwire RX/TX pins.