|
Post by littlejo44 on Jan 17, 2020 18:29:33 GMT
Hi guys..I got hold of a Nano to start learning...I rocketed past the 'get an LED to flash on and off' level, and flushed with success, I loaded the echook code.. all went well...Then I read the bit about using linear temp sensors, which we intend to do, but when trying to load the revised code, it threw up an error....as in the pic... Is there something else I should have installed? could you please advise.. Thank you.. John Attachments:
|
|
|
Post by Rowan on Jan 18, 2020 10:22:48 GMT
Hi John, Looks like you're missing a library. At the top of the code you'll see a few '#include<xxxxx>' statements. Each of these pulls in a library for you to use in your code, normally giving you easy to use functions for more complex operations. Due to Arduino's popularity you'll find someone's written a library to do almost anything you could think of doing with an arduino! In this case you're missing the LiquidCrystal_i2c library. If you google the file name, followed by 'arduino', this is the top hit: www.arduinolibraries.info/libraries/liquid-crystal-i2-cDownload the zip library (latest version), then in the Arduino IDE go to the Sketch menu > Include Library > Add .ZIP Library. Find the file you've just downloaded and the Software will copy it to its libraries folder for you. Try to upload again and it should work! The LiquidCrystal library interfaces with a display. If you're trying the DerbyGrammar code then you may need another library for the temperature sensors too. Hope that helps
|
|
|
Post by littlejo44 on Jan 18, 2020 10:55:01 GMT
....thanks Rowan...I'll give it a go later if The Mrs lets me have the time☹️ I've spent many hours on YT over the last few days and I'm confident that this 'old dog' can (maybe) learn a few 'new tricks'..Fingers crossed🤞 Cheers.. John
|
|
|
Post by littlejo44 on Jan 21, 2020 13:20:31 GMT
Hi guys.. It's the 'pain in the butt with the soldering iron' here.. Following on from my last 'crisis', I followed Rowan's good advice and installed libraries for the temperature sensors, and IDE seems happy with that...but after installing the suggested Liquid Crystal library, IDE comes back with the line.. Lcd.begin(); highlighted, and the error, 'No matching function for call to 'LiquidCrystal_I2C::begin()' displayed at the bottom.. I've tried a different library with similar results.. Could you point me in the right direction (again) please? Thank you.. John..
|
|
|
Post by icooper on Jan 21, 2020 13:33:25 GMT
Hi John, I can look in to this a little more later for you (#work!), but a quick google would suggest you're not the only user having an issue with this library: forum.arduino.cc/index.php?topic=183775.0From a v quick look it looks like there are a few different versions of the library floating around and some don't accept the 'Lcd.begin()' command. I've had a look at the examples folder in the library Rowan linked and it uses 'lcd.init();' and I cannot see an lcd.begin(). At a guess it might be worth swapping this out. Think a few posts are worth a quick read through and try not to be intimidated! (I'm sure it'll be something easy enough to sort and hopefully you'll learn a few bits along the way anyway). Good luck, Ian
|
|
|
Post by icooper on Jan 21, 2020 13:35:56 GMT
What are you trying to add John? (I assume an I2C display of some sort?)
It looks like you have a library mismatch between what the code you have it written for and the library you downloaded. It would appear there are a few libraries with the same name available! (doh!)
Sorry this is a bit disjointed! Just replying as ideas come to me
|
|
|
Post by littlejo44 on Jan 21, 2020 13:53:45 GMT
Wow...that was quick!! Thank you.. We're not trying to add a display at all at this stage..but we do intend to use linear temp sensors, and Derby have already modified the code to use them which is why we are copying their program....I guess they have added an LCD display also..J
|
|
|
Post by littlejo44 on Jan 21, 2020 14:02:24 GMT
.....just a quick follow up...I swapped out 'init' as you suggested and it ran through and installed ok...Thank you..John
|
|
|
Post by icooper on Jan 21, 2020 15:27:53 GMT
Great to hear other teams using other teams code, very inspiring to see Nice one, sounds like you may still have the wrong library there but I expect (based purely on the name!) that you aren't actually using any of the features in the I2C display (since you don't have a display!) Since that is the case here, I'd recommend trying to remove any content that you aren't using from your sketch. I think this would be a good learning opportunity and it's usually fairly easy to do. Make sure you stop and attempt to compile and test from time to time that your original functionality is still working. This will neaten up your sketch and hopefully mean that you don't have to use that I2C library at all anyway! Try using // in front of lines you shouldn't need. This will comment out the line so the compiler will ignore this. Then you can always pop it back in (rather than deleting straight away) If you need help with this please post your sketch up here and I can help
|
|
|
Post by littlejo44 on Jan 21, 2020 16:00:55 GMT
....will do...thank you.. It's amazing just how many 'pennies are dropping' as I go through, what must seem to you, an extremely elementary process on the lower part of that 'learning curve'...Thanks both for your patience.. We have one of the lads assembling the echook kit..in the meantime I'm trying to get the code and the various inputs sorted with another nano and a breadboard to save some time getting everything up and running when the controller, (and, hopefully, the car), is finished..J
|
|
|
Post by icooper on Jan 21, 2020 16:29:34 GMT
It's all good learning for us as well! Shows where we maybe need to put more effort on the documentation/video instructions etc!
Nano+breadboard, great idea! Hopefully you'll be seeing that the circuits are actually quite basic (intentionally) so should be fairly easy to implement individual sensors etc.
|
|