How to communicate with an Arduino circuit using a web app? - web

I have recently made a Arduino circuit as shown in the link below:
http://www.instructables.com/id/DC-Motor-Control-With-Bluetooth/
As you can see, the person in the video of the above link used a bluetooth controller app to control and send signals to the Arduino board via HC-05 bluetooth board.
Here's the question. How can I use a web app/ web instead of a native app(like the video) to control and send signals to the Arduino board?

It would require the use of additional hardware. It is for connection to the network or broadly web.
Once we consider this we have several options infront of us :
We can use a gsm module. In this hardware we would insert a sim and use its network for connecting to web. But when you buy a GSM module be sure that it got http services as some modules support only message services. ( I would suggest GSM sim 900A module).
We can use a wifi hardware. This would act just same way as wifi on our mobile or laptop. But it requires some hotspot in its range thus restricts portability.
We can connect an ethernet cable to the arduino module and use the network. But thus restricts portability more than wifi. But you can go for that to if that satisfies your need.
Once you get the network for connecting to the web, now comes the point where your device must listen on the web for the requests that come to the device and must act as the inputs. We call it creating a server. The server listens on web and respond to them. As for a beginning you can follow this article.

Related

Reading Bluetooth data and command (Raspberry pi 3)

I am currently working on a project that make me control media center and a few domotic parts in my living room.
I have connected on my raspberry pi 3 a NAS, my Spotify account (with hifiberry, controls to close my amp, my PC and a few lights...
At first to control it all I programmed a web server that I can access on my phone. That made the job but it is not completely user friendly since I have to have my phone go to the interface and do whatever I have to... And I'm not a web designer 😁 it's far from perfect!
I've made some research and I have decided to build a bluetooth remote control (raspberry pi 3 do have Bluetooth low energy).
Since nothing exist as I want, it is going to be a custom one made with Arduino mini and hm10 module.
But I'm stuck on the raspberry part!
How can I read the Bluetooth data send by my remote and launch scripts according to the command sent?
Via a serial listener of some kind?
Yes, in fact, you should use a serial port to connect your pi with Bluetooth module.
You then use software input information for your purposes, but you must first implement the hardware and hardware interface first.
You can build application software with the Python programming language.

Is it possible to connect to Sony Camera Remote API with hybrid mobile apps

Since we need to have a UDP socket to discover the device, and since javascript seems not supporting UDP, is it possible to connect to Sony Camera Remote API with a javascript based mobile app (non native).
As said in the comments, you can use Cordova to do the SSDP discovery.
However, as far as I can see, the API is HTTP-based. So if you don't need discover (can write in the IP address and port manually), then this should be possible to do.
Did you ever get anywhere with this project? I'd be interested in getting some LiveView and controlling a camera using Javascript.

Can PeerFinder class of .NET communicate with mobile phone devices through laptop via bluetooth?

I doubt the limitation of PeerFinder class in .NET. Can it make connection only with other laptops when implemented on laptop and phone to same phone when implemented on phone? Is it limited only to communicate with Windows OS devices, or is it able to communicate with any bluetooth device irrespective of OS?
Kindly, help me if you are sure of this class capabilities. I have seen the implementation of 32Feet.NET but my question is limited about PeerFinder class and its limitations.
Start from this link, in which you can find several useful links for WinRT communication (the suggested protocol to use from Windows Phone 8 to communicate using NFC or Bluetooth)
http://blogs.ugidotnet.org/Nick60/archive/2012/12/30/win-rt-proximity-communication.aspx
You have two possible scenarios:
App to Device: you can connect a Windows Phone 8 device to third party devices (for example a LEGO robot or car audio systems) Bluetooth/RFCOMM (that is serial port profile, for the emulation of RS232 serial connections).
App to App: for communications between Windows Phone 8 devices and also Windows 8/Windows RT devices!
The PeerFinder class is the base class for discover another instance of your app on a nearby device and create a socket connection between the peer apps by using a tap gesture or by browsing:
http://msdn.microsoft.com/en-us/library/windows/apps/br241203.aspx
Hope this helps!
Unfortunately, it seems that the only way to stablish a socket connection using Bluetooth between a WP8 app and a Windows 8 app is by triggering the connection using NFC tap gesture. Although the PeerFinder documentation suggests that you might be able to specify AlternateIdentities to advertise peers running on both devices, it seems that Windows 8 relies on WiFi Direct, while WP8 uses Bluetooth.
So, if you are not able to use the NFC tap gesture between both devices to trigger the connection, you might not be able to pair both apps running on the different devices.
See this thread for more info.

Is it right to send data in J2ME through cable by mean of DatagramConnection?

I want to send data by using J2ME between a mobile phone and a computer. The two machines are connected by the phone's cable : there is no Wi-Fi , no http connection , no Internet. So is it wrong or correct to use the J2ME DatagramConnection to send data to the computer when the mobile's cable is inserted to the USB port of the computer ?
When you talk about interaction between two systems, first you will need to address the connectivity. In the situation described, the connectivity between the phones is via USB, which is a serial port. So the communication can be done over serial port only.
Datagram can be used over IP networks and other specialized networks.
If for some reason you are unable to communicate via USB, check if you could connect both of them using Bluetooth. If your phone has Bluetooth and the computer doesn't, then you could purchase an USB Bluetooth Dongle for very cheap.
If you are trying to get logs of your application, you can check out Bluetooth loggers for J2ME. There are quite a lot of them. One such library is microlog
Hope this helps.
It depends, if you require high speed of data transfer while can bear some data loss then DatagramConnection is ok, and if you can't bear loss of data packets, then you should use TCPConnection.

What are the other mean of connectivity apart from bluetooth?

I want to consider all the connectivity possibilities in JavaME , connectivity between phone mobile and PC. Apart from bluetooth what are the possible means of such connectivity ?
You need to have a look at the Generic Connection Framework (GCF) which gives you the ablility to open connections using various protocols. You do this my using a Connector object.
It is obviously completely dependant upon the hardware upon the phone and any optional JSRs that it implements, but you can communicate to a phone via:
Using internet protocols e.g. Http, Datagram, Socket connections (Requires PC to be accessible via the internet)
NFC (Near Field Communication)
Using a Secure Element (SATSA)
Serial COMM port connection (I think)
I'll completely admit that using some of these methods to communicate between a PC and a phone are nuts but it could be done.
The best thing to do for simplicity is to use bluetooth or a HttpConnection.
U also able to connect mobile with pc via internet (Gprs).Better u look at the Generic Connection Framework (GCF) documentation.It will help u

Resources