Go Down

Topic: How can i use javascript based web UI to wirelessly communicate with arduino? (Read 161 times) previous topic - next topic

Twin_N

I was using involt(link to involt github page) to communicate with arduino from web based UI. I was using wired connection(usb) then. But, now i have to make it wireless and i want to use the same UI i had created earlier (i can make changes in function calls and etc but it has to be web based and easy to learn). I need to exchange arrays of numbers returned by sensor data anylizing functions constantly between pc and arduino because im using the pc as a control station for the bot. 
Wide range(5-6metres) is preferred but if it arises too much complexity then i'll go with 5-6feet range.

I'm still a newbie in arduino and electronics so please give a detailed answer

PaulS

Quote
How can i use javascript based web UI to wirelessly communicate with arduino?
The question is really "How can I send serial data wirelessly to the Arduino". There are many ways to do that.

What you need to define is:
How much data? How many bytes in what period of time?
How far?
With what reliability?

Absolutely having to have every byte arrive, when sending 10 Gigabytes of data per second, a distance of 27 kilometers is really going to challenge your wallet. Getting 7 out of 10 bytes through per hour a distance of 25 centimeters will be far more economical.
The art of getting good answers lies in asking good questions.

Robin2

I was using involt(link to involt github page) to communicate with arduino
Dont' yah just luv those websites that are all pretty pictures and no useful content.

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

sterretje

From https://involt.github.io/getting-started.html
Quote
What communication methods are supported?

    Serial - desktop
    Bluetooth (2.0/classic) - desktop and mobile
If the limitations of bluetooth don't  pose an issue (no idea if it does the 5-6 meters you mention), I would think that that's the way to go. But take into account the comments made by PaulS.
If you understand an example, use it.
If you don't understand an example, don't use it.

Electronics engineer by trade, software engineer by profession. Trying to get back into electronics after 15 years absence.

Twin_N

What you need to define is:
How much data? How many bytes in what period of time?
How far?
With what reliability?
Yeah 7-10 bytes per second is a fair amount. But, it'll be constantly sending 7-10bytes(20 at most) every second.
As i said, 5-6 meters is good but for the cost i'll go with 5-6feets then. What chip should i use for that? And how much will be the data corruption or data loss?
Reliability is an issue because it'll be constantly exchanging data. If distance reduces reliability too much then i'll alocate less space for my concept showcasing.

Thanks for the reply though.

Twin_N

Dont' yah just luv those websites that are all pretty pictures and no useful content.

...R
No documentation or anything :'( even i couldn't find any useful content in the internet. I was thinking of sticking a smartphone on top of the bot and use that smartphone as a wifi module for the bot and connecting the smartphone to arduino via usb. I already have a router and i can always make a local server to connect the smartphone with my already existing router + my UI is web based so i wont need to share variables or such. But, the problem is they didn't mention how to use involt to share variables and functions with arduino in android. They did mention connecting to arduino with bluetooth but that was just a single page document containing almost no information. If you somehow find any way to send serial data from android to arduino through js please let me know.

Robin2

If you somehow find any way to send serial data from android to arduino through js please let me know.
Why do you need to use Javascript?

It should be easy to communicate with an Arduino using Bluetooth and I believe there are Android apps that can do that. Maybe have a look at this RemoteXY link

Another fairly simple option would be to use an Arduino plus an ESP8266 WiFi module to host a simple website that your Android could connect to and display the website in the Android browser.

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

Go Up