Arduino Client for IOSignal
.
To run the client example, you must first install iosignal-cli and then run the iosignal server.
- support Mac, Linux & Windows
# global install.
$ npm install -g iosignal-cli
# If you encounter a permissions error, use sudo.
$ sudo npm install -g iosignal-cli
-
use
io-server
command. -
ios
is a shortened name for io-server. -
use -L option to connect Arduino Client.
-
use -l option to connect Browser Client.
% io-server -l 7777 -L 55488
opening WebSocket Server: 7777
opening CongSocket Server: 55488
┌─────────────────────────────────────────────┐
│ │
│ Serving │
│ │
│ IOSignal Over WebSocket │
│ │
│ Web Browser & Node.js │
│ - Local: ws://localhost:7777 │
│ - Network: ws://192.168.0.213:7777 │
│ │
│ IOSignal Over CongSocket │
│ │
│ Node.js │
│ - Local: cong://localhost:55488 │
│ - Network: cong://192.168.0.213:55488 │
│ │
│ Arduino │
│ - host: 192.168.0.213 │
│ - port: 55488 │
│ │
└─────────────────────────────────────────────┘
The library comes with a number of example sketches. See File > Examples > IOSignal within the Arduino application.
- Prepare the server.
- You can run your own server by installing iosignal-cli.
- Connect to the server using the server IP address and port number like below.
io.begin( &client , "192.168.0.204", 55488);
- If you don't have a server, you can use the public server for trial.
- Connect to it using the following code
io.begin( &client , "io.iosignal.net", 55488);
- Communicate with your web browser and Arduino
- Connect to http://app.iosignal.net using a web browser.
- Connect to the same server as your Arduino.
- Press the Send button on the web app to send a signal to the Arduino.
- Press the button on the Arduino to send signals and receive them on the web browser.
[Korean]
- 서버를 준비합니다.
- iosignal-cli 를 설치하여 직접 서버를 운영할 수 있습니다.
- 아래와 같이 서버 ip주소와 port번호를 사용하여 접속합니다.
io.begin( &client , "192.168.0.204", 55488);
- 서버가 없다면 체험용 공개 서버를 사용할 수 있습니다.
- 아래 코드를 사용하여 접속합니다.
io.begin( &client , "io.iosignal.net", 55488);
- 웹브라우저와 아두이노 통신하기
- 웹브라우저로 http://app.iosignal.net 에 접속합니다.
- 아두이노와 동일한 서버에 접속합니다.
- 웹앱에서 전송 버튼을 눌러서 아두이노에 시그널을 송신합니다.
- 아두이노의 버튼을 눌러서 시그널을 보내고 웹브라우저에서 수신합니다.
- pub/sub style multicast: by channel name.
- uni-cast: one to one messaging by CID.
CID
is a Communication Id.- CID subscribing: subscribe one peer using CID.
- HomeChannel: group by IP address.
- Authentication
- Encryption
- E2EE
- thanks to the
Boho
[ github ]
The library uses Stream for interacting with the underlying network hardware. This means it Just Works with a growing number of boards and shields, including:
- Arduino Uno + Ethernet Shield
- Arduino UNO R4 WiFi
- ESP8266
- ESP32
-
CLI program
-
Javascript:
iosignal
[ github | npm ]- Node.js server ( WebSocket, CongSocket)
- Node.js client ( WebSocket, CongSocket)
- Web Browser client( WebSocket)
-
Arduino client:
- Arduino Library Manager:
IOSignal
- or
iosignal-arduino
[ github ]
- Arduino Library Manager:
-
Arduino example working with remocon web app
- Arduino Library Manager:
Remocon
- or
Remocon
[ github ]
- Arduino Library Manager:
This code is released under the MIT License.