Jump to content

Arduino Sketch update


Recommended Posts

Couldn't decide which forum was right for this so mods feel free to move.

I'm a self taught, basic arduino programmer; I've got a sketch I eventually managed to create ages ago using nrf24 wireless libraries that is now hideously out of date - core sketch is fine but the wireless side is practically stone age. I've spent the weekend going through tutorials trying to get my head around how to update it so that it uses the more modern libraries and error checking (all things I like the sound of having) but it's such a leap up I'm getting nowhere with it. I've asked on the arduino forums and get the usual unhelpful responses, snide comments and links to tutorials I've already tried and failed to follow well enough to translate to my sketch. Any BR members more comfortable with Arduino able to update the sketch to the new protocols / features for me in return for beer tokens?

Transmitter is currently a 75 line sketch

Receiver is 40 line sketch

 

taaaaa

 

t

Link to comment
Share on other sites

Not a direct answer, general thoughts for those of  us being typo bound and not having mind of programmer, used freelancer.com for couple of things in past, found better control and quality than fiverr. 

Arduino graphical programming, isolates the typos from logical errors, might set real programmers teeth on edge with bloated code, hey,  if it get`s the project working.

Tinkercad,https://www.tinkercad.com/ web based,  has a code block style programming scheme and online Arduino simulator, even eliminates wobbly wires on the breadboard.

XOD , https://xod.io/ functional block and wires style programming, really easy to grasp, slightly uncertain future at moment.(Russian development team,now looking to gift the project to someone that can afford the hosting fees)

Visiuino https://www.visuino.com/ also block and wires style , has an NRF 24 block in the 39USD  upgrade  version

No hijack intended Tom, leave a direct answer to your question to the Tims and  DrV`s of the world that can code the receiver with one hand and complete the Times crossword with the other.

 

 

 

 

 

Link to comment
Share on other sites

Hi Tom, I am happy to have a look at it for you, or to help you get it going (not doing the Times crossword though) - I haven't ever used the NRF24 modules and I don't have one here, so the best I could do would be to get it to the point where it builds without errors, which might not translate to working hardware. Where are you getting stuck at the moment?

Link to comment
Share on other sites

I built a remote control servo using a couple of NRF24 modules and two Arduino Nano boards which worked fine. No error checking but that shouldn't be too hard to add. What is the end product you're trying to achieve?

Link to comment
Share on other sites

I have a working sketch that doesn't use the latest libraries and doesn't have error checking; every time I compile one to use I have to make sure the libraries haven't updated (because so much has changed since this was written) plus I do like the idea of having the error checking and selectable channels; but the guides on how to implement the newer libraries are nowhere near as user friendly as the people who recommend them think so I've had no luck modernising my sketches

Link to comment
Share on other sites

Arduino's and sketches are a bit of a nightmare for me, so I don't blame you. Just built a project with four little oled displays. They use the adafruit library but they're smaller than the usual number of pixels. Somebody has built a modified library with some extra lines of code for the smaller display. I carefully renamed the original and put the new library in place. All worked beautifully. Now I need to go back to an old project using a larger, standard display, and despite switching the libraries back to original, it won't compile. It's absolutely doing my nut! Seems to still want to use the new library even though it currently has a completely different name and extension! 

Link to comment
Share on other sites

I've PM'd Tom about this but changing libraries is often a nightmare and frequently the easiest way is to start a new project, get something very basic working then copy your previous application back in. A lot of the big microcontroller manufacturers provide their own "HAL" which sits in between your code and the hardware of the micro, these are notoriously bug ridden and badly documented.

For Chris's problem, sounds like you need to do a "clean" which removes all built code and forces a rebuild from scratch. Unfortunately Arduino IDE does not offer this standard compiler feature but you can force it by changing the "Board" setting in the Tools menu to something else, attempt compile (will probably fail), then switch the board back to your correct board and compile again.

  • Upvote 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.