Bill's Arduino flower class corvette

投稿者 billmcl61 12 エントリー(複数) 1 9月 2020 — 8 10月(省略) 2020
18いいね数
44コメント
章 01 / 12

12 章 · ページ 1 の 2

billmcl61 最初の投稿

Bill's Arduino flower class corvette

Hi Everyone,

Been away for a while but I haven't been idle.
My latest passion is playing with Arduino, I'm still at the very early stages and modifying existing sketches, but the feeling of triumph after biting off to much to chew, that getting something to work gives you is exhilerating (I know that's a spelling mistake but I'can live with that 😊).
I'm taking the flower class corvette off of the top of the fridge and doing something with it. I.E. controlling the RC with a 433MHz comms module. So my build starts here with an update of where I am just now.
The boat - hull is put together and.... well Rome wasn't built in a day, plus I needed thinking time - several years worth 😊
Arduino - Slightly further ahead, I've got the steering part done, I've just to do a bit of re-scaling there to completely finish that part off - I just discovered a trim wheel on the joysticks ... ah read the attached it's all in there 😊
I've tried attaching the document as a pdf file hopefully it's worked
がいいねしました MouldBuilder and Martin555 and
billmcl61 #4 of 12

Part 1B speed and steering from a single controller

Hi everyone this is the second part of part 1...if that makes sense...a part 1b if you will😊
Although I haven't had a chance to test this part yet the sketch compiles so that's good enough for me 🤞, I revised and brought up to date the frizling drawing and Arduino Sketch, so I'll attach them here. This second part deals with motor control, so hopefully some useful bits for you

Enjoy

Bill
がいいねしました Martin555
billmcl61 #5 of 12

Some research details on 433MHz comms

I'll try to include some links to 433MHz comms that should be useful for the next stage
がいいねしました Martin555
billmcl61 #6 of 12
がいいねしました Ianh and G6SWJ and
billmcl61 #7 of 12

433MHz comms

Hi,

The communications between the Arduino Nano in the Boat and the Arduino Nano in the RC hand set will be carried out by a 433MHz transmitter and receiver set. To interface the Arduino's and the 433MHz set we need to install the Radiohead library, within the Radiohead library is the RFASK.h function which will be called by the line "#include< RFASK.h > " at the start of the sketch in both Nano's. The ASK (amplitude shift keying) function will, after being configured with a few simple commands, read and write our code between the 2 arduino's. Sounds simple huh mmm we'll see 😊

Take care all

Bill
billmcl61 #8 of 12

Stage 2 - complete

Hi Everyone,

The past week has been spent searching for info, it was only when I took a step back and deciphered what I had already that things finally took shape and I actually felt that I understood what was on all the printouts that had amassed around me into ever growing piles. Sometimes you can't see the wood for the trees 😊.
The bottom line is that I can now move the joysticks on one Arduino and see the change in value on the other. This brought a huge sigh of relief, I was beginning to feel that I would never get it.
I used the cheap 433MHz set just to get this bit of code completed, but I will be using Hopefm's RFM69HCW 433MHz module for the next stages and the final project: this module has the major advantage of being able to have it's operating frequency (among other parameters) programmed to a legal one and it's comms is bi-directional-so maybe I might do something there to bring back some telemetry.
Many thanks to Jonathan (G6swj) for his guidance and advice on things, not least on what comms modules to use. I'll do another update tomorrow with the code and some photos.

Bill
がいいねしました G6SWJ
billmcl61 #9 of 12

Arduino Nano won't download sketch

Hi, my package from Germany finally arrived after 2 weeks with my Arduino Nano's, not A-Z Delivery's fault, just the postal chaos that's still with us.
I tried to load a sketch onto the first one, no dice, mmm tried the second one -same thing, Ah-ha must be the cable I thought so found another mini usb cable -nothing. So back onto the web tried a few things still nothing then found an instructables article with the same issue, tried all of it still no dice, then second comment down hit it right on the nail, the processor isn't the original arduino so if you follow the below steps, bingo it works 😊

MichaelB1268
MichaelB12681 year ago
ReplyUpvote
I bought a cheap Arduino Nano clone from China which uses the CH340C USB chip instead of the chip found on the genuine Arduino. I fixed it by:
1) Installing the CH340 driver
2) Set processor to ATmega328P(Old bootloader)
3) Using Arduino IDE installed locally on my Win10 pc, NOT the online Arduino IDE. NB. If both the locally installed and online Arduino IDE are open at the same time they can generate a different error "avrdude: ser_open(): can't open device "\\.\COM8": Access is denied." Simply close the online Arduino IDE to fix this error.

Bill
がいいねしました Martin555
billmcl61 #10 of 12

Comms range testing

Hi,

A while since my last post, but as with all things when you hit a minor road block you end up spending days trying to knock it down instead of simply driving around it, I'm still at that stage. (trying to knock it down unfortunately 😴)
I'm now trying to put together a simple (hah!) comms range tester. This comprises of 2 breadboards each with a Nano controller and either a transmitter or receiver. The receiver board also has an oled 0.96" I2C SSD1306 display which will display a free running reference 1 second count and a received packet count which is also sent every second by the transmitter. The transmitter will simply send the value 1 every second and the receiver will add that to the packet count and reset the received buffer back to zero ready for the next transmission. This part is relatively simple to code, just 2 lines on the oled display - a reference count and a received packet count.
The problem is 3 fold:
The Arduinos have limited memory, 16k of main memory and 2k of Sram, the oled consumes 1k of Sram (which can't be moved into the main memory) and the Strings and variables are also held in Sram (which apparently can be moved into Sram) - task number 1.
The Sram can become fragmented, which gives a false impression of the amount of available memory, the memory count doesn't count the gaps in the memory table. Can this be defragged ? - task number 2.
Sometimes the Libraries try to use the same resources which results in something that did work, i.e. the oled display, suddenly no longer working when you add the next stage of code, in this case the comms code (which did work previously) - task number 3.
Questions:
1.The Nano shows available Sram but is it fragmented ? causing a false reading.
2. Is there a conflict between the SSD1306 Oled library and the Radiohead RH-ASK comms library.
I've attached some reference docs of where I am at the moment, some parts of the sketch aren't complete as yet

Take care everyone

Bill
がいいねしました G6SWJ

Delete this post?

サイトから削除されます。

この下書きを破棄しますか?

下書きは削除され、復元できません。

未完成の下書きがあります

どう扱いますか?