the learning curve

I've been messing around with my emonTX this morning and have some observations to share. this probably is only useful for those fumbling their way in blind with little/no knowledge of C++ but here we go.

First i tried testing my board using the code sketch in the Ardurino IDE called Blink, which can be found in File>examles>basics. initially no luck, but I found using a multimeter that I was getting a blink signal on Pin 19, contrary to the code which specified pin 13. something to do with the board being not 'official' Ardurino?

I found a reference in the emonTX firmware code to the LED being on pin 9, and lo and behold when change the Blink code pin reference from 13 to 9, it worked. Horah! please do humor me... Could i suggest that this step is added to the build guide to reassure us nervous novices by way of a concusive test?

Secondly, after i downloaded the libraries and firmware sketch and unzipped into their own subfolders, when i restarted IDE it complained about non ASCII characters and said the libraries could not be used... indeed, it failed to compile, sayig amongst other things that 'sleepy' hadn't been declared. I solved this by removing the hyphens from the library folder names, and now can upload the frmware and get the ten second short flash.

next challenge is to get a temperture sensor working...  

 

Robert Wall's picture

Re: the learning curve

Hello Toby

This is the book I usually recommend for learning C++: http://www.relisoft.com/book/index.htm

and there's another C++ book that's quite useful: Thinking in C++, by Bruce Eckel. There's a download here:

http://www.planetpdf.com/developer/article.asp?ContentID=6634

 

Regarding the problem you had with pin numbers, the problem is the 'official' Arduino documentation is, as you suggest, based on one set of hardware, and because of layout constraints there have had to be some changes for the OpenEnergyMonitor board.

Also bear in mind, when you're reading the forums, that contributors can be using either "official" Arduino, OEM hardware or breadboard construction, and there are significant differences in some areas, so here's a warning to make sure you understand which a particular thread (or even contributor) is referring to before you adopt a suggestion.

Do feel free to ask any further questions if you need help or clarification.

 

toby.cambray's picture

Re: the learning curve

Thanks Robert

Thanks for your response, the books look useful. Think I need to gather a bit more knowledge in order to form sensible questions!

 

 

calypso_rae's picture

Re: the learning curve

I've found the reference material in the Arduino's IDE to be excellent:

Help -> Reference -> Hardware -> <your device type>    provides pinout details etc for the variant that you're using;

Help -> Reference  lists most of the language components, many with coded examples.

Feel free to ask any questions here.  But it may be quicker and more satisfying to work things out for yourself!

 

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.