Hi there all,
I’ll start by saying I have no clue about any of this so please excuse any really dumb questions. But where better to ask/learn than here. Please be gentle
My daughter is working on a project with the Mega which is using 2 bespoke sensors which feed into the analogue pins. And are working as required.
The next logical step is to make it wire free and work well,
Her aim is to make it Bluetooth or WiFi.
I guess the questions I’m really asking are
Is Bluetooth doable at all
Would you be able to upload the sketches via Bluetooth or still need to plug in to upload?
If so can it be made to talk with the serial monitor? (She will be designing a computer app, but need to test the hardware first if possible)
If this is all possible can it be adapted to use two of the items (ie 2 complete systems that interact to provide data to the same PC),
And finally, if any(or all) of it is possible how would you experts go about starting.
Many thanks in advance for your input, it will really help her out.
Ps. I have already searched and know that Bluetooth at least should be possible, but nothing seem to answer all the questions. Thanks Use code tags to format code for the forum
certainly doable with communication with a smartphone or PC
suggest you move to a ESP32 which has onboard WiFi, Bluetooth Classic and BLE
it is supported by the Arduino IDE
Hi, thanks for the reply,
Like I said I blinked nothing really, and the project is part of her degree so I can’t really say much, I’m just asking to give her some feedback. Another dumb question, I assume the ESP32 has analogue pins? I know that one of things she’s doing needs analogue rather than digital.
if data is just being transmitted to a PC why not use the serial monitor output? do you require bluetooth?
the Mega USB connection creates a serial port on the PC (a COM port on Windows) - a program (in C++, C#, Python, Java, etc) can read the serial data
The whole assembly will be located in a moving item, very much easier if it is without wires. Currently the system shows its data in the serial monitor. But a bespoke app is to be created for better user experience. Also means that it needs to be battery powered
suggest ESP32 devices using Bluetooth Classic (lot easier than BLE)
note the ESP32 uses 3.3V logic so be careful connecting it to 5V logic devices
you will require a good battery in particular when transmitting
Edit: how far from the receiver will the device move?
My favorite resource is DroneBotWorkshop.com. He produces 45 minutes accurate, but not boring, videos on the subject following his accompanying transcript, complete with history, drawings, programming and demonstrations. His web site and youtube channel has more, and deeper videos of this subject and many more.
Will the Bluetooth be hard to code? (I appreciate this May be a silly question, again, know nothing, the project is meant to be more about the product than tue code if you get my drift)
the ESP32 bluetooth libraries come with example programs
probably simplest is to use bluetooth classic serial
on a PC when you pair with it it creates a COM serial port which you can access with a terminal emulator or from a program written in C#, Java, Python, etc
In that case, and since you already have the Mega in your hand, you might as well just pay up $3.50 for an HC-05. plug it into pins 0,1, and you are off to the races. No fartarsing around with ESP32, no changes to the code you already have working.
One of those phone charger thingies should suffice as a power supply - $2, plus 18650 cell.
Question 4 is a bit nebulous but, if you are getting what you want on the serial monitor, you can get it on the laptop via Bluetooth. A standard terminal programme, like RealTerm can receive the datastream through Bluetooth to confirm this.
Thanks for your replies all,
This seems to be exactly what she wants (except obviously running different end program). Just wondered what you guys thought of it?
Thanks
The first thing you need to do is carefully consider whether you really need it. One reason for the dearth of information on this subject is that hardly anyone does. There may be good reasons to be found within the robotics crowd, but the only reason I can think of is where changes need to be made to the programme but Arduino has already been installed in an life-threatening position. I guess user-incompetence might also be a factor here.
As things are, I understand you already have all the programming you need.