Offline
Newbie
Karma: 0
Posts: 16
|
 |
« Reply #15 on: October 03, 2012, 08:36:37 pm » |
Hey everyone, I have an update, with more questions. Let me know if this is the wrong venue for these questions! I successfully acquired my RTC, LED matrix, FM Shield, and a few other things, and now I'm working on getting the RTC and the Matrix to play nice together. I'm using Florinc's Bookclock code, which seems like a good jumping off point (link here). But I'm wondering which pins in that code are meant to be hooked up to the matrix? I've used this resource to successfully test the matrix before, but I do not know if I should change which digital pins I'm using. Also, can anyone tell where the buttons need to be hooked up to? I'm a novice at deciphering code. Thanks!
|
|
|
|
|
Logged
|
|
|
|
|
USA
Offline
God Member
Karma: 14
Posts: 644
|
 |
« Reply #16 on: October 04, 2012, 09:39:33 am » |
Also, can anyone tell where the buttons need to be hooked up to? I'm a novice at deciphering code.
In the code you linked to, the buttons are on pins 16 and 17 which are alternative names for A2 and A3 (since the Analog Input pins can also be used for general digital I/O). The button on A2 (pin 16) is the incrementing button, while the one on A3 (pin 17) is the menu button.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 16
|
 |
« Reply #17 on: October 05, 2012, 07:18:02 pm » |
Thanks, should I use a pull up or a pull down resistor with those pins?
I'm also wondering how to make the RTC be recognized by the arduino, as it seems the Wiseduino for which this code is meant for has the RTC integrated, and therefore doesn't specify which pins it needs to be hooked up to. Any advice would be greatly appreciated!
|
|
|
|
|
Logged
|
|
|
|
|
|
|
0
Offline
Edison Member
Karma: 6
Posts: 1398
Arduino rocks
|
 |
« Reply #19 on: October 07, 2012, 09:39:22 pm » |
TopTube, You connect the DS1307 RTC to your Arduino on I2C, as shown in the datasheet: http://datasheets.maximintegrated.com/en/ds/DS1307.pdfSDA and SCL are pins A4 and A5 of your Arduino, respectively. You need 10k resistors as pullups on these 2 pins. Backup battery is also necessary, as is a 32kHz crystal.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 16
|
 |
« Reply #20 on: October 08, 2012, 06:20:56 pm » |
@dc42
Thanks for the tip, a time signal receiver would certainly be cool, but I'm pretty committed to going the ds1307 route.
@florinc
Thanks! I now have the RTC displaying the correct time on the serial monitor! So far I haven't been able to get the matrix to light up (besides with test code). I don't have a tilt switch of any kind hooked up, and the serial monitor reads "current state is 0". Could that be preventing the display from lighting? I also haven't been able to upload the "quotes" text file (I'm on a mac). Maybe that's the issue?
I'm also having trouble with the setup buttons, should I wire them (with pull-up or pull-down resistors) as always high or always low? I couldn't tell from the code. Thanks for your help!
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Edison Member
Karma: 6
Posts: 1398
Arduino rocks
|
 |
« Reply #21 on: October 08, 2012, 07:51:25 pm » |
Connections to the display are as follow (copied from the code): #define HT1632_DATA 6 // Data pin (pin 7 of the display) #define HT1632_WRCLK 7 // Write clock pin (pin 5 of the display) #define HT1632_CS 8 // Chip Select (1, 2, 3, or 4 of the display, depending on the ON switch)
You can force the position of the tilt in the code, in function loop(). The buttons are on pins A2 and A3. These 2 pins should also have 10k pullup resistors to Vcc. I think the first thing for you is to get the display working. You could use this (simpler) test program: http://code.google.com/p/wiseclock2/downloads/detail?name=Test_3208.pde&can=2&q=#makechanges
|
|
|
|
|
Logged
|
|
|
|
|
USA
Offline
God Member
Karma: 14
Posts: 644
|
 |
« Reply #22 on: October 09, 2012, 10:55:43 am » |
florinc is correct the resistors should be in pullup configuration, and 10ks will be fine.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 16
|
 |
« Reply #23 on: October 09, 2012, 06:58:43 pm » |
I now have the buttons hooked up properly (I believe), and I connected the arduino anolog zero pin to vcc, which seemed to calm the endlessly scrolling "current state = 0" in the serial monitor. I'm still not having any luck with the led matrix. The test code you posted won't work for me, I got a number of errors when trying to compile it, one of which is that "DEBUGPRINT is not declared in this scope" Am I missing libraries for it? The normal bookclock code compiles and uploads without issue. I have had success with the test code found on this page, with the outputs changed to match the pins used by the bookclock. Here are some pics of the serial monitor and my breadboard setup, if they're any use.  
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Edison Member
Karma: 6
Posts: 1398
Arduino rocks
|
 |
« Reply #24 on: October 09, 2012, 07:55:04 pm » |
Delete the line(s) with DEBUGPRINT. Did you set correctly the switch (on the back of the display) for CS2?
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 16
|
 |
« Reply #25 on: October 09, 2012, 10:17:17 pm » |
Thanks for the reply! Yeah, I did select the correct chip on the matrix (tried a few different configurations, too). I'm still having trouble with the test code, I deleted all the DEBUGPRINT lines, but now I have this error: "Documents/Arduino/libraries/myfont/myfont.h:9: error: expected initializer before 'myfont'"
I wish I knew what that meant, should I edit the myfont document somehow?
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 16
|
 |
« Reply #26 on: November 30, 2012, 09:38:02 pm » |
Hey everyone, I thought I would unearth this thread to ask for some more guidance. I recently had time to work on the project again, and I'm still having issues with the code.
I managed to get florinc's test code working for the 3208 (so the matrix works), but I still get nothing from to bookclock code that I'm using. The bookclock code compiles, and the time is displayed in the serial monitor, but the display still refuses to light up.
Anyone have any ideas?
|
|
|
|
|
Logged
|
|
|
|
|
Seattle, WA USA
Offline
Brattain Member
Karma: 316
Posts: 35521
Seattle, WA USA
|
 |
« Reply #27 on: December 01, 2012, 10:28:43 am » |
Anyone have any ideas? Post your code?
|
|
|
|
|
Logged
|
|
|
|
|
|
|
|