Hi, I’m really excited that I’ve received my spark cores.
I got the maker’s kit, which has a lot of fun looking stuff in it, but there are some things I simply don’t know what they are. Is there an inventory of these parts somewhere?? With pictures???
If not:
What are the two SN74HC595N devices for?
I was hoping for a RS-232 level converter, but I don’t see one. (I have one for a galago board that I made work easily, but I am curious why there isn’t one in the maker’s kit. How else would one use the Rx/Tx pins??)
There’s a little black do-dad with a red wire and a blue wire, and something at the top that rotates. Is this a pot? A motor? There are some similar larger, silver devices.
There are two black, cylindrical components with two leads, one shorter than the other. What are these?
What are the maximum currents for the LED’s, by color?
There is what looks like to be a tri-color LED. What are the pin outs?
These are 8-Bit Shift Registers. You connect it to three digital ports on the Spark Core (Data, Clock, Latch) and clock in a byte of serial data. One byte is eight bits, right? So you're sending it eight bits in a serial fashion; each of those eight bits corresponds to one of the eight pins on the shift register.
If you send the following eight bits: 0 1 0 1 0 1 0 1
Then pull the Latch pin low, this is what the shift register's outputs will look like:
O1: Low
O2: High
O3: Low
O4: High
O5: Low
O6: High
O7: Low
O8: High
You can also chain multiple shift registers together to get many more outputs out of your three pins! If you had two of them hooked together, the first byte would be shifted into the second chip once you sent the next byte.
Backchannel UART via USB (Serial)
When you plug the core into your computer, it should show up as a serial port. You can call this port via Serial.begin and use it to communicate back and forth with your computer, so there's no need for an FTDI cable or RS-232 level converter!
Low Voltage UART via TX/RX Pins (Serial1)
This is the second UART that's brought out to the set of pins just above A7. You can call it in your sketches with Serial1.begin and use it to talk with other TTL Level Serial Devices (such as GPS modules, LCD Serial Backpacks, etc). However, keep in mind the RX pin cannot tolerate more than 3.3V, is you may want to use a simple resistor voltage divider if you're hooking it to a 5V device (though, the TX pin should be fine on a 5V device).
The cu.usbmodem411 is what my Spark Core shows up as, but yours might have a different number. (You can always look in /dev/ before and after plugging it in to make sure!)
Now that you know the port it's on, you can use screen to connect to it.
screen /dev/cu.usbmodem411 115200
Syntax: screendevicebaud
You can use CTRL-A then *CTRL-* to quit. Type man screen for a user's manual on screen, it's a very powerful tool!
Keep in mind that the serial device will only enumerate if you've actively called it with Serial.begin(baud) somewhere in your code on the Core (generally in void setup).
If you want a GUI option, there's a very basic but useable app called Parley on the Mac App Store. If you have the Arduino or Energia IDE installed, you could also just use the Serial Monitor built into it.
Thanks TIm. I had done some more research and found this as well. It’s good that it’s documented here. I looked at Parley and it looks really good. And only $5 is even better.