Hi,
I tried to compile your code inside the web IDE and get the following errors - do I miss something here?
timeapi.cpp:3:1: error: 'UDP' does not name a type
timeapi.cpp:9:1: error: 'byte' does not name a type
timeapi.cpp:12:1: error: 'String' does not name a type
timeapi.cpp:24:1: error: 'String' does not name a type
timeapi.cpp: In function 'void sendNTPpacket(const char*)':
timeapi.cpp:63:9: error: 'packetBuffer' was not declared in this scope
timeapi.cpp:63:41: error: 'memset' was not declared in this scope
timeapi.cpp:78:2: error: 'TimeUdp' was not declared in this scope
make: *** [timeapi.o] Error 1
Thanks for looking into this - still getting errors:
In file included from ../inc/spark_wiring.h:30:0,
from ../inc/application.h:31,
from timeapi.cpp:1:
../../core-common-lib/SPARK_Firmware_Driver/inc/config.h:12:2: warning: #warning "Defaulting to Release Build" [-Wcpp]
In file included from ../inc/spark_wiring.h:30:0,
from ../inc/application.h:31,
from worldclock.cpp:2:
../../core-common-lib/SPARK_Firmware_Driver/inc/config.h:12:2: warning: #warning "Defaulting to Release Build" [-Wcpp]
In file included from ../../core-common-lib/CMSIS/Device/ST/STM32F10x/Include/stm32f10x.h:459:0,
from ../inc/spark_wiring.h:29,
from ../inc/application.h:31,
from worldclock.cpp:2:
../../core-common-lib/CMSIS/Include/core_cm3.h:211:14: error: expected ')' before '|=' token
../../core-common-lib/CMSIS/Include/core_cm3.h:250:14: error: expected ')' before '|=' token
worldclock.cpp: In function 'void loop()':
worldclock.cpp:68:28: warning: statement has no effect [-Wunused-value]
worldclock.cpp:70:34: warning: statement has no effect [-Wunused-value]
worldclock.cpp:72:26: warning: statement has no effect [-Wunused-value]
worldclock.cpp:74:31: warning: statement has no effect [-Wunused-value]
worldclock.cpp: In function 'void adjustTime()':
worldclock.cpp:105:18: warning: statement has no effect [-Wunused-value]
make: *** [worldclock.o] Error 1
Error: Could not compile. Please review your code.
I have been looking at this project. I appreciate your words on the front cover of the clock but i think i can get that sorted, one way or another. The bit I am going to have a problem with is the electronics and the code!!
By the way of components I was thinking of these LEDâs
I could use some help with the PCBâs, mostly it is lost on me.
I note that you say -1 If youâre using my circuit boards schematics, try to combine them on a single board. Connecting boards via pin header works, but itâs not very stable. Also consider using a TIPC6B595 as @PaulRB suggested.
I understand what you mean about the pin headers. It looks a bit like a toy crocodile!. Do you think it would be possible to screw/fasten each board onto a longer supporting board to give better stability.
I like the idea from Paul RB. But I wouldnât have a clue how to implement it. It sounds like it would make the project simpler to have one chip not two and being a beginner simple is appreciated. LOL
Hey I have downloaded the Eagle PCB software!!! What is the worst that can happen? LOL
@Julian, instead of using RGB Piranha Superflux LEDs and bothering with making your own PCBâs for the drivers you could simply use WS2812âs - they have a build in driver and can be controlled directly by the spark core which will simplify the design of the clock significantly. You get 100 âneo pixelâ style boards for about $45 - at least this is what Iâm considering
Hi @larry105, Thank you for the suggestion. I have done a bit of looking into the WS2812âs following your post and they look great! I will have to get a few in and try them out.
Do you have any experience of using them / sourcing them? Would I be correct to assume from your post that you are based in the US?
Nice one Ken. OK now we are getting really lazy!!! LOL (and for me to say that!!)
Those panels are brilliant. They do a 16x16 one, WOW, Ready made!!. LEDâs stuck down in place ready for the job. I assume they have ready made code etc.
When are they coming to the UK???
I think with this idea the whole project needs a re-think. Just display the date, time, temperature and the price of tea in China, on a scrolling rainbow effect macro display!!
hi @larry105, have you made a front plate? how did you do it? Do you have some pictures?
I was thinking about the backing plate. The one with the holes in it that contain the LEDâs. I was wondering if we could use a ready made solution like ⌠a seed tray.
Not at all. I have a power consumption of 20mA per LED + constants (Spark Core). Out of my head, not more than 5W for the whole clock probably. Heat should never be an issue, but someone needs to pay your electricity bill
FYI, there are pictures of my backing plate in the imgur album. I rasped some foam, which worked okay. If you have access to a nice drill, wood is the best fit IMO.
My question is, can I have an uneaven number of pixels in an array? For example, I may have 8 in the first line and then 10 in the next line, then 6 then 12. Is that acceptable and workable or does the array have to be 10 x 10 or 10 x 12?
After thinking about it for a while I decided to go with the Superflux LED instead of WS2812 (⌠sorry @Julian) - the reason is that a RGB LED does not produce a crisp white color and of cause that you have a higher power consumption since you need to power 3 LEDs instead of one. You can of cause do some nice effects if you go with RGB (like day/night etc.)
I did a test using a MAX7221 driver as well as a few LEDs to verify that the SW side works well.
Hey @larry105, no problem. I am still thinking??? I have not bought anything yet. The thing I like about the WS2812 system is that the LEDâs are already connected and there is a library ready to go.
@kennethlimcp thinks the coding wonât be too much of a problem, but then he is ace (and I am a numpty! :)) So I am still thinking to go for the WS2812 at this time. I think I will even need a hand with this (but hey it is a learning experience).
How are you planning on connecting the superflux LEDs together? I think they are breadboard ready but I have not looked at how to connect them.