Oldest posts shown first (Show Newest First) | (Print Booklet) |
๐ฌ Re: Bill's Arduino flower class corvette
4 years ago by ๐ฎ๐ช billmcl61 ( Warrant Officer)
โง 2 Views ยท 0 Likes
Flag
Just looking at your message again Doug, the Radiohead library seems to be the goto place for arduino comms, the link for the download is on the first of the 433MHz weblinks I posted (I think it's the first ๐)
Bill ▲
โฉโฉ
No likes yet
This member will receive 1 point for every like received |
Login To
Remove Ads ๐ฌ Re: Bill's Arduino flower class corvette
4 years ago by ๐ฎ๐ช billmcl61 ( Warrant Officer)
โง 2 Views ยท 0 Likes
Flag
Oh yeah, 9V battery clips from Germany???. As it happens they are not so easy to find here, I'm sure most towns have a radio shack type store but I haven't found one here. So I just added it to an order of other stuff.
Bill ▲
โฉโฉ
No likes yet
This member will receive 1 point for every like received |
๐ฌ Re: Bill's Arduino flower class corvette
4 years ago by ๐ฎ๐ช billmcl61 ( Warrant Officer)
โง 2 Views ยท 0 Likes
Flag
Hi Doug,
Yep I'll do that, up until recently I've been getting my stuff from the big 2 mail order firms E-*** and A*****, but most of the stuff was coming from the far east and some wasn't arriving at all, I'm not the most patient person, so I was looking around and found AZ, their prices are in the same ballpark and delivery is within a week to Ireland, so I gave them a whirl, plus their tech documentation is pretty good and free to download. P.S. you get a free nano with your first order ๐ Bill ▲
โฉโฉ
No likes yet
This member will receive 1 point for every like received |
๐ฌ Re: Bill's Arduino flower class corvette
4 years ago by ๐ฉ๐ช RNinMunich ( Fleet Admiral)
โง 4 Views ยท 2 Likes
Flag
Hi Bill,
Glad to hear you making progress๐ When you have tested the Sketch post it as a 'New Update', see yellow bar at the top. Not sure why you have to get 9V battery clips (9V block battery?) from Germany, but thanks for the AZ-delivery tip and link. They have lots of goodies and I am ordering an Arduino Starter kit from. I know the town where they are, about an hour's drive from me. Pretty little town on the Danube so worth a day out๐ Only seen it from the river up to now๐ Cheers, Doug ๐ ▲
โฉโฉ
billmcl61
Martin555
|
๐ฌ Re: Bill's Arduino flower class corvette
4 years ago by ๐ฎ๐ช billmcl61 ( Warrant Officer)
โง 3 Views ยท 1 Like
Flag
I've finished the next part of the sketch which includes the speed control section, used the trim dials that I found on the joysticks to give me 2.5K ohms in the center position so I'll adjust the calculations accordingly and I've brought the fritzing layout up to date.
I'm, just waiting for 9V battery clips to arrive from my new toyshop AZ-delivery in Germany (hopefully my link worked) so that I can test the sketch ▲
โฉโฉ
RNinMunich
|
๐ฌ Re: Bill's Arduino flower class corvette
4 years ago by ๐ฎ๐ช billmcl61 ( Warrant Officer)
โง 2 Views ยท 0 Likes
Flag
Hi Doug,
Many thanks for your input and advice, I have a load of stuff that I have gleaned from the net but only a few items are worth keeping and using, the comms issue is pretty interesting and as I dig deeper I'm finding more and more options, but 433 MHz is a cheap and relatively simple (??? yeah heard that before ๐) system, oh and did I mention that it's cheap ๐. I've made a bit more progress so I'll do another post with that. Still looking for the lead to connect my camera to the laptop, so we should have a couple of photos soon Bill ▲
โฉโฉ
No likes yet
This member will receive 1 point for every like received |
๐ฌ Re: Bill's Arduino flower class corvette
4 years ago by ๐ฉ๐ช RNinMunich ( Fleet Admiral)
โง 4 Views ยท 2 Likes
Flag
Excellent start Bill๐
Hope this can be applied to other comms module in a different frequency band cos I suddenly remembered that here in Germany we can't use the 430MHz band since 2008. Some other countries seem to require you to hold an Amateur Radio license to be able to use 433MHz๐ค Not sure about UK. As you say there are many other LPDs (Low Power Devices, TX power 10mW) using this frequency 433-434MHz, but not microwave ovens; they are in the 2.4GHz band. Thankfully not in the part we use for RC๐ 433-434MHz is also slap in the 70cm Amateur band, 430-440MHz, where the Hams are allowed to transmit 40 or 50W, so interference could be expected. Jonathan (G6SWJ) will know more about that๐ Main thing (to me at least) is the Arduino control info. Then I can see about mating it to a 40Meg or 2.4Gig set. Awaiting developments with interest๐ Cheers, Doug ๐ ▲
โฉโฉ
billmcl61
Martin555
|
๐ฌ Re: Some research details on 433MHz comms
4 years ago by ๐ฎ๐ช billmcl61 ( Warrant Officer)
โง 7 Views ยท 0 Likes
Flag
Ah, this video answers a lot of my questions. I'm ok with setting up the initial comms settings, libraries etc, but I wasn't sure how to send more than one piece of information between the 2 arduinos i.e the 2 joystick positions.
All the other example videos I found use a text message to illustrate the concept, but this chap uses a temperature and humidity sensor (2 inputs transmit end, 2 outputs receive end ๐๐๐) which I can modify to suit. Ah at last, I can now hook up 2 arduinos on the bench and test simple comms using the 433MHz units. I'll be changing the 433MHz units to RFM69HCW units as these are bi-directional transceivers and you can change the operating frequency to a legal frequency band, but the 433 units will do just now for basic testing and the code will need minimal adjustment for the RFM units Mmm just realised that this is the same video as the post above...I don't think I watched it all before๐that'll teach me Bill ▲
โฉโฉ
No likes yet
This member will receive 1 point for every like received |
Login To
Remove Ads ๐ฌ Re: Some research details on 433MHz comms
4 years ago by ๐ฎ๐ช billmcl61 ( Warrant Officer)
โง 8 Views ยท 1 Like
Flag
And another one, I'll print these 3 documents out and get a clearer picture from there of how this all works.
As for the legality of this I've tried researching the subject for here in Ireland, but govt depts all over the world seem to pride themselves in making what should be a simple task into an ordeal...I wonder if I should just adopt the Irish approach of "Ah sure, it'll be grand" ... maybe I'm just overthinking this ๐ ๐๐ค๐๐๐ Take care Bill ▲
โฉโฉ
Martin555
|
๐ฌ Re: Some research details on 433MHz comms
4 years ago by ๐ฎ๐ช billmcl61 ( Warrant Officer)
โง 8 Views ยท 1 Like
Flag
and another, unfortunately I don't seem to be able to include more than one link in a message
▲
โฉโฉ
Martin555
|
๐ฌ Re: The reference links for Arduino
4 years ago by ๐ฎ๐ช billmcl61 ( Warrant Officer)
โง 7 Views ยท 0 Likes
Flag
Ah that's interesting Jonathan, a nice easy way to check data transfer.
Bill ▲
โฉโฉ
No likes yet
This member will receive 1 point for every like received |
Login To
Remove Ads ๐ฌ Re: The reference links for Arduino
4 years ago by ๐ฎ๐ช billmcl61 ( Warrant Officer)
โง 7 Views ยท 0 Likes
Flag
Hi Jonathan,
Just been through the datasheet, thank goodness I don't need to know all of that, quite a read ๐ and I found the "HM-TRP Setting GUI" on the Hoperf website, so that I can now put in the basic settings. It's quite amazing the difference between the RFM69HCW and the cheap 433MHz modules, not just in documentation but also functionality (transceivers rather than just one way comms), just ordered 2 of them to try out. Now I'll have to find something to send back from the boat, mmm battery level perhaps. Thanks again for the info. Bill ▲
โฉโฉ
No likes yet
This member will receive 1 point for every like received |
๐ฌ Re: The reference links for Arduino
4 years ago by ๐ฌ๐ง G6SWJ ( Midshipman)
โง 7 Views ยท 0 Likes
Flag
Hi Bill,
Arduino RF data exchange - Test Script Found this video from a while back so uploaded to YouTube. Each line is a seperate data packet - this is throttled to 1 packet every 150ms Jonathan _._ ▲
โฉโฉ
No likes yet
This member will receive 1 point for every like received |
๐ฌ Re: The reference links for Arduino
4 years ago by ๐ฌ๐ง G6SWJ ( Midshipman)
โง 8 Views ยท 1 Like
Flag
Hi Bill,
You hit the nail on the head 100% re NRF24L01... You will get quite a buzz when you see data appearing @ Arduino No.2 - still makes me smile. I use extensively HOPERF RFM69HCW UHF 433MHz (424-510MHz configurable) devices - I have loads of them. Not that you need it but the manufacturer handbook is 80 pages which hints at the product calibre. They are brilliant little workhorses. They are quite sophisticated and I use them with the lowpowerlabs library. It (radio/RF) is a great micro topic within the Arduino world. Get ready to hit some brick walls: > Like how do you receive a value greater than 255 - most devices send data as individual byte's and you may have to do some bitwise manipulation to add 2 bytes together at the reciever end >Throttling the data exchange so it occurs for example 4 times a second and not continuously to allow other processes to exist harmoniously on your single core etc etc. Look forward to an update on your progress Regards Jonathan _._ ▲
โฉโฉ
billmcl61
|
๐ฌ Re: The reference links for Arduino
4 years ago by ๐ฎ๐ช billmcl61 ( Warrant Officer)
โง 7 Views ยท 0 Likes
Flag
Hi Jonathan,
That's great thanks for helping out. Yep I know what you mean about finding the Irish info, I've spent a few fruitless days searching, so I'm just going to go with the UK regs and hopefully they will be harmonised, I can't see the communication regs being different on each side of the border, and as I live only a few miles from the border and possibly have to use sailing facilities in the North I'm just going to go with that. Once I get to the stage of installing the equipment I might check with the authorities, only problem with doing that is once they are aware of what you are doing they will become extra inquisitive๐ I'm going to go with the modules you talked about that will take me into the slightly higher legal frequency. I've had a look at the NRF24L01 module and there appears to be a huge variance in quality and ability, So for now I think I'll stay in the lower frequencies. I'll be playing about with comms this weekend with the 433MHz modules that I have, I want to find out how to read the movement in the joysticks in one arduino over the 433MHz link into another arduino. Bill ▲
โฉโฉ
No likes yet
This member will receive 1 point for every like received |
๐ฌ Re: The reference links for Arduino
4 years ago by ๐ฌ๐ง G6SWJ ( Midshipman)
โง 8 Views ยท 1 Like
Flag
Hi Bill,
I spent a while on the various internet sites trying to unravel rules for use of SRD's in Ireland. They don't make finding the info easy! Seem to have been down many rabbit holes and not found an answer yet. I will keep looking - perhaps you could use 2.4GHz using an NRF24L01 That said unless your "solution" is CE stamped (CEPT) then it will more than likely fall outside the strict letter of the law anyway. Regards Jonathan _._ ▲
โฉโฉ
billmcl61
|
๐ฌ Re: The reference links for Arduino
4 years ago by ๐ฎ๐ช billmcl61 ( Warrant Officer)
โง 7 Views ยท 0 Likes
Flag
Hi Jonathan,
Thanks for that, I was looking at that document yesterday strangely enough, unfortunately I was looking at the wrong part of it (pg19), I wondered why the reg ref no's didn't make any sense, I just went by the frequency, probably wishful thinking ๐. Rats, now I have to find the Irish regs, that will be another wasted day๐ด, I tried looking for this before but the Irish regs - any of them - have about 20-30 pages, or more, of irrelevant rubbish before you get to the meat'n'totties, ah well, most of the Irish regs are aligned with the UK - so I was being cheeky and trying a shortcut ๐. Thankfully you spotted that, strange how you can only do telemetry in that part of the band, but then again your unfortunate but spectacular friend can probably answer that question. I'll have a look at your HC12 stuff and see if I can use these 433MHz units for anything. Back to the drawing board, my stuff didn't arrive from Germany so I've got a few days to have a look, the comms should be similar hopefully. Best regards Bill ▲
โฉโฉ
No likes yet
This member will receive 1 point for every like received |
๐ฌ Re: The reference links for Arduino
4 years ago by ๐ฌ๐ง G6SWJ ( Midshipman)
โง 7 Views ยท 0 Likes
Flag
Hi Bill,
See comments in other post re HC12 frequency change etc - My understanding 433MHz is not legal in UK for model control From OFCOM site 458.500 - 459.500 MHz General model control (not airborne) Many people doing Arduino and boat/sub projects There is a forum dedicated to it with a few participants - ▲
โฉโฉ
No likes yet
This member will receive 1 point for every like received |
๐ฌ Re: The reference links for Arduino
4 years ago by ๐ฎ๐ช billmcl61 ( Warrant Officer)
โง 7 Views ยท 0 Likes
Flag
Hi Jonathan,
I was looking at your arduino project earlier, you've a lot of interesting stuff in there. Wow, I would have loved to have seen his exit, pity he missed the grass though. I haven't really thought about a fail-safe but now I'll really have to think of one, interference is a definite risk in this band. Doug was saying that it can't be used in Germany now, but I found some stuff saying that it can be used in the UK for RC models ๐ Do you have any info on how to alter the frequency, I was just going to go with the 433MHz modules as they came, I didn't realise I could alter the frequency on the wee cheapies. At the moment I'm still on the bench, and waiting for a delivery of bits so that I can test the motor control, then onto the comms. PS. do you know if someone else was doing an arduino project as well? Bill ▲
โฉโฉ
No likes yet
This member will receive 1 point for every like received |
๐ฌ Re: The reference links for Arduino
4 years ago by ๐ฌ๐ง G6SWJ ( Midshipman)
โง 9 Views ยท 2 Likes
Flag
What a great project...
Bill do think about a failsafe for your system - I have an "Arduinoer" friend that had "go fast stripes" added to the bottom of his lifeboat as it exited the pond and traversed across the tarmac (did some considerable damage)!!! What frequency are you using - you should be able to set registers to crank it up to 459Mhz. Doug 40-50 watts tuh! - ERP in the kW's thank you! ๐ Regards Jonathan ▲
โฉโฉ
billmcl61
Martin555
|
๐ฌ Re: The reference links for Arduino
4 years ago by ๐ฎ๐ช billmcl61 ( Warrant Officer)
โง 8 Views ยท 1 Like
Flag
Yeah I'm quite proud of myself ๐ค
▲
โฉโฉ
Martin555
|
Login To
Remove Ads ๐ฌ Re: The reference links for Arduino
4 years ago by ๐ฌ๐ง Martin555 ( Fleet Admiral)
โง 9 Views ยท 2 Likes
Flag
Not guilty Doug.
I struggle to remember this sort of stuff myself LOL!! Martin555. ▲
โฉโฉ
billmcl61
RNinMunich
|
๐ฌ Re: The reference links for Arduino
4 years ago by ๐ฉ๐ช RNinMunich ( Fleet Admiral)
โง 9 Views ยท 2 Likes
Flag
Who's a clever lad then?๐
๐ ▲
โฉโฉ
billmcl61
Martin555
|
๐ฌ Re: The reference links for Arduino
4 years ago by ๐ฎ๐ช billmcl61 ( Warrant Officer)
โง 8 Views ยท 1 Like
Flag
Dang got it wrong the new series of toptechboy videos are at the top, the earlier series is listed at the bottom
▲
โฉโฉ
Martin555
|
๐ฌ Re: The reference links for Arduino
4 years ago by ๐ฎ๐ช billmcl61 ( Warrant Officer)
โง 9 Views ยท 2 Likes
Flag
Actually I managed to figure it out...somehow ๐
▲
โฉโฉ
Martin555
RNinMunich
|
๐ฌ Re: The reference links for Arduino
4 years ago by ๐ฎ๐ช billmcl61 ( Warrant Officer)
โง 9 Views ยท 2 Likes
Flag
Hi Doug,
Yeah I figured there had to be an easier way ๐ all I have to do now is to remember to paste the link ๐, this is fun I love finding out how to do things ▲
โฉโฉ
Martin555
RNinMunich
|
๐ฌ Re: The reference links for Arduino
4 years ago by ๐ฎ๐ช billmcl61 ( Warrant Officer)
โง 8 Views ยท 1 Like
Flag
Hopefully the links I posted will be of help to you, if you are starting out in Arduino I would highly recommend that you watch the first 4 videos in the first toptechboy series (the one with the grey shirt), I'll add the link below to the full listing of the Arduino lessons, so the first 4 lessons are the ones. Enjoy
▲
โฉโฉ
Martin555
|
๐ฌ Re: The reference links for Arduino
4 years ago by ๐ฉ๐ช RNinMunich ( Fleet Admiral)
โง 9 Views ยท 2 Likes
Flag
Thanks Bill, very useful๐
I see you've twigged how to post several links at once. Suspect Martin may have PMed you how๐ Good for him๐ Cheers, Doug ๐ ▲
โฉโฉ
Martin555
billmcl61
|
๐ฌ Re: 433MHz comms
4 years ago by ๐ฌ๐ง G6SWJ ( Midshipman)
โง 8 Views ยท 1 Like
Flag
Hi Bill,
The HC12 can be used "barebones" for comms without any library - it simply acts like a wireless Serial Port. Utilising the RadionHead library may give you some additional functionality. (Data Packets,CRC checks). The HC12 can be "configured" using AT commands - you bring the "SET" pin low and then send your AT commands (change baud rate , radio channel (400Khz steps)) The failsafe needs to protect your project from data errors but most significantly from signal loss. If the motors are commanded to spin and you loose radio data link you have no way of stopping the motors (or steering) !! - forget what the specs say 1KM + the RF output/receiver capability for these devices is minimal and likely to drop out at some point. I don't think the HC12 has an RSSI facility (signal strength) - many other RF devices do and it's a great thing to have...the software can monitor the "signal state". Indeed the remote transceiver can request an "ACK" from the shore based transceiver to see if it's still alive ๐ I have not used the HC12 but I have used many other Arduino comms devices with great success - BUT I have chosen not to use them to control the throttle or rudder on my models - I value them too much....... Investigate using "constrain" for any "maps" or data values you use to command throttle,rudder - the map function is linear and does not trap rogue values passing through if you pass a rogue value in ( the fromLow & fromHigh parameters do not stop out of range values!!) You will need to be mindful of the loop efficiency (latency) And the last and most important point "Have fun with it" - hope my comments "add" to your journey - they at least might save a few more grey hairs ๐ Regards Jonathan ▲
โฉโฉ
billmcl61
|
๐ฌ Re: Stage 2 - complete
4 years ago by ๐ฎ๐ช billmcl61 ( Warrant Officer)
โง 7 Views ยท 0 Likes
Flag
Ah gotcha, that makes a lot of sense.
Yeah now you put it in those terms 16MHz is pretty fast, last time I was involved in comms, many years ago, we were working in KHz ๐, but that was just making up (RS232) data cables and making sure the baud rates were the same, I'm pretty sure it was about the same time windows 3.1 came in ๐ which will give you an idea how long ago it was. I'm slowly making progress, I've soldered in the pin headers to the Nano's and soldered leads onto everything else ready to put the transmitter together, I'm just thinking of a way that I can put the antenna together now so that I won't have to do to much mangle-isation when I change over to the RFM69HCW modules. Antenna wise I was thinking of a monopole, adding a ground plane antenna to give the signal a bit more oomph. I know that I shouldn't, but I'm being drawn to going straight for the RFM modules, I have a bad habit of trying to skip steps-usually ending up with 1 step forward and a lot of shuffling backwards hoping no-one will notice ๐. I'll have to behave and go through the steps ๐ Oops forgot a power supply to the nano, but added now Bill ▲
โฉโฉ
No likes yet
This member will receive 1 point for every like received |
Login To
Remove Ads ๐ฌ Re: Stage 2 - complete
4 years ago by ๐ฌ๐ง G6SWJ ( Midshipman)
โง 8 Views ยท 1 Like
Flag
Hi Bill,
Let the receive function run unrestrained. It's the TX function that you want to run throttled. Otherwise the TX is sending another TX packet and the poor RX hasn't processed the first packet - result is a hung system. More fun to come program flow wise when you want 2 ways comms - sending back telemetry..... I think we forget that even the standard 16 MHz Arduino is fast... really fast. More stark when you talk it in terms of 16 Million cycles per second - with every tick of the clock, the CPU fetches and executes one instruction - still makes me smile - crazy technology. Beam me up Scotty... Regards Jonathan _._ ▲
โฉโฉ
billmcl61
|
๐ฌ Re: Stage 2 - complete
4 years ago by ๐ฎ๐ช billmcl61 ( Warrant Officer)
โง 8 Views ยท 1 Like
Flag
Hi Jonathan,
Ah that does indeed takes me down memory lane, I haven't done wire wrapping since I was at college, I've just had a look at wire wrapping tools and I see what you mean, they were never cheap but wow, even the "cheap Chinese stuff" ain't. I wonder how hard it would be to make one out of a swizzle lolly stick, it must be about the right ID, plus you have to dispose of one of these lollys ๐ Been doing some soldering today so that's my gimbles plus a few other bits finished, nano's to get pins soldered next, should've been done hours ago but I got distracted and ended up watching Das Boot instead. I'll have another crack at running the software again tomorrow. Just one question about the delay code you gave me, I've added it to the transmitter(my earlier post said receiver) but should I add it to the receiver as well, I wasn't sure if these would self sync or if it might cause a clash. But it feels good getting back on the tools again. Bill ▲
โฉโฉ
G6SWJ
|
๐ฌ Re: Stage 2 - complete
4 years ago by ๐ฌ๐ง G6SWJ ( Midshipman)
โง 8 Views ยท 1 Like
Flag
Hi Bill,
Good to see you are making progress - look forward to more updates. I think we all tread the same path re our code development. I often spend many happy hours trying to find a set of code I wrote a while back - my filing system is quite logical but it still fails me frequently. The software vs. hardware integrity is a challenge when developing a solution. Often we go looking for code issues when it's simply a poor connection. I have started to use "wire wrap" as a fast and pretty reliable way of connecting "stuff" - sure this will take some down memory lane.... The cost of genuine wire wrap tools will make your eyes water and your wallet feather light.. I will get back to posting about Arduino - been a very strange time for me... got less and greyer hair now having been playing with 1515 RGB Leds (1.5mm x 1.5mm SMT) Regards Jonathan _._ ▲
โฉโฉ
billmcl61
|
๐ฌ Re: Stage 2 - complete
4 years ago by ๐ฎ๐ช billmcl61 ( Warrant Officer)
โง 8 Views ยท 1 Like
Flag
Hi Jonathan,
I found the right bits of code for the boat and rc handset and have them uploaded, and your delay code worked a treat. Up until I added the delay, I was just using a cutdown test program and once I put the full code together I was getting a load of junk or nothing at all, but after I added the delay to the receiver, everything worked nicely, I'll start reducing the delay now from 1 second so that I get a reasonable response time. I'm still losing comms every so often, well quite a lot actually ๐, but that's down to my wiring rather than the code, I've a lot of temporary wiring joints (i.e. bits of wire twisted together) so I'm certain that's the cause. I have a carton of the wire I'll be using for the final project arriving Mon or Tues, along with my pin headers for the Arduino Nano's (the pin sockets on the Uno's aren't very secure and the wires pop out every so often), so I can crack on with making things more permanent and hopefully get rid of these wee niggles. ▲
โฉโฉ
G6SWJ
|
๐ฌ Re: Stage 2 - complete
4 years ago by ๐ฎ๐ช billmcl61 ( Warrant Officer)
โง 7 Views ยท 0 Likes
Flag
Hi Jonathan, that's great thanks, I'll have a closer look today at your code, I'm thinking of making the transmission time every 500 milliseconds initially, and see how the response is, I see what you mean about packet crashes, so it'll be easier to close up the TX time than trying to figure out where the problems lie. I'm moving onto using the Nano's (now that I can talk to them ๐), and I'll be cleaning up the code a bit before I transfer it over and hopefully everything still works. I've been using temporary bits of code to get the comms working and of course I can't remember which bits of code I've used, so I'm trying to find the right bits now to match what is in the uno's ๐. I think I'll end up printing them all out and eliminate them that way. I really have to find a better way to organise these files, but I don't really mind because I know one of them works, and although I thought my filing system worked, I guess it needs a wee bit of attention ๐.
Take care Bill ▲
โฉโฉ
No likes yet
This member will receive 1 point for every like received |
๐ฌ Re: Stage 2 - complete
4 years ago by ๐ฌ๐ง G6SWJ ( Midshipman)
โง 8 Views ยท 1 Like
Flag
Bill,
Look forward to an update on your progress. I have working scripts if you require, personally I don't like asking for help until I have reached the point of throwing the kit across the room or in the bin - I find being an Arduino Detective all part of the fun of getting something working, climbing inside the solution and logically reasoning what is wrong etc etc - I am sure you experience the same. One thing you do need to be aware of is that you do not want to "send" every high frequency loop cycle - that simple fact could present itself as a non working solution as the external RFM69HCW does need some time (ms) to do it's stuff before being asked to do it again. Much better to adopt - run my "send" function every X time period interval - suggest 200ms to start with e.g. long previousMillis = 0; // last time updated long interval = 1000; // interval - our delay interval in milliseconds void setup() { } void loop() { unsigned long currentMillis = millis(); if(currentMillis - previousMillis > interval) { // time interval has been reach - run code here previousMillis = currentMillis; // update the time we have run this event so we can compare with future time } } Regards Jonathan _._ ▲
โฉโฉ
billmcl61
|
๐ฌ Re: Comms range testing
4 years ago by ๐ฎ๐ช billmcl61 ( Warrant Officer)
โง 7 Views ยท 0 Likes
Flag
Hi everyone,
I've made some progress, well sort of๐, the memory problems have been solved by using a brilliant text only library SSD1306ascii.h, that Jonathon told me about, for the OLED display that uses very little memory and is perfect for my needs. Another good suggestion from Jonathon is to use a second Nano for the RC controller OLED display in the finished project, to spread the memory load. I had to do a couple of changes to the range test code to get my 2 lines displayed on the OLED, the first line is a reference free running 1 second counter and the second line is a count of the received packets from the transmitter. The transmitter will send a value of 1 for 500 milliseconds and then a value of 0 for 500 milliseconds then keeps toggling between 0 and 1 every 500 milliseconds. The receiver then reads these 1's and updates the packet count on the OLED display. I've tested this part of the code and everything works...sort of๐, I'm getting some data through then nothing, so I changed to the hello world sketch, which I know works perfectly, and I had the same results. So this points to the receiver and transmitter modules, and-or the integrity of the wiring, my money is on the latter๐. I'm still hooked up to breadboards (which I'm coming to hate) and despite searching for tight sockets, I feel that I'm not getting good connections. After this post I'm going to start soldering things together in a semi permanent fashion, so that I can rule out the wiring integrity doubts. It has to be said that the basic 433 MHz modules are susceptible to noise interference and this might be adding to the issue, but lets rule out the obvious first. Once I'm happy with my installation, I plan to do the range test well outside of town so that should help with RF interference issues. I won't post the code at the moment as I was up to stupid o'clock this morning, and I ended up unsure which sketches I had modified... again ๐, so I'm taking a day off from the code side of things, to do some much needed hardware modifications, then I'll figure out which is the real version of the code. I promise I will do some photos soon, I just need to re-find my camera Take care everyone Bill ▲
โฉโฉ
No likes yet
This member will receive 1 point for every like received |
Login To
Remove Ads ๐ฌ Re: Comms range testing
4 years ago by ๐ฎ๐ช billmcl61 ( Warrant Officer)
โง 7 Views ยท 0 Likes
Flag
Hi Jonathon,
Yep been there before, I used to write and commission plc's when I was working in engineering, never gave up and the feeling you get when you finally crack it can't be beaten. I found that breaking code down and proving each block on it's own helps a lot, at least you can isolate and concentrate on the problem areas and deal with them one by one. I got an answer from Adafruit in the US which pretty much confirmed what I suspected, the Nano boards don't have enough memory, so I might have to scrub the OLED display and use the serial print monitor instead, just means that I'll have to take my laptop on the range test, which is a real pity, the OLED is a really nice (and compact) display. Bill ▲
โฉโฉ
No likes yet
This member will receive 1 point for every like received |
๐ฌ Re: Comms range testing
4 years ago by ๐ฌ๐ง G6SWJ ( Midshipman)
โง 7 Views ยท 0 Likes
Flag
Hi Bill,
Good to read your update. I have been in your position so many times - all works, then you add something and it doesn't. I often get ambitious and add loads of code only to find it does not work. I am certain you will know all this and probably practise it - You then have no option but to backtrack and then slowly add line by line until you find the offender and then work out the way forward. I save every day, if not many times each development session with the myFileName_001, myFileName_002 so it is easy to backtrack. However there are some funnies with Arduino which everybody seems to know about apart from the developer at the times things misbehave. Always a solution - I often use multiple - distributed Arduinos in the same solution - sometimes one just handles the display interface while others are doing the real stuff. I will have a look at your code and see if I can make any suggestions. I love the process of fixing what's broken - it can however at times get tedious - would be nice to move of to the good stuff type experience. Never been beaten by the little blighter yet... Regards Jonathan _._ ▲
โฉโฉ
No likes yet
This member will receive 1 point for every like received |