'websocket'에 해당되는 글 3건

Arduino + WebSockets II

by Daniel Garrido



Overview

These postings show how to use WebSockets to display data taken from Arduino and broadcast it to any Browser with WebSocket support.

This project describes how to use WebSockets to display data taken from Arduino and broadcast it to any Browser with WebSocket support. Test your browser here: http://websocket.org/echo.html

Please read the first part of this serie: http://yopero-tech.blogspot.com/2012/02/arduino-websockets.html

First of all we need to decide what data to display and what to control in Arduino from the web page .

In this example I am going to control 3 remote controlled relays that you can buy at your hardware store and I want to display the values from 2 temperature sensors.(DS18S20)

3 main parts of software & hardware(Arduino Board)

This project is composed out of 3 main parts of software apart from the hardware(Arduino Board):

  1. WebSocket Server:
    • Python
    • Autobahn
      • Twisted
        • PySerial
  2. MCU (Micro Controller Unit)
    • Arduino Board(Vinciduino in my case).
    • Arduino IDE or AVR studio.
  3. Client:
    • Any web server, I use xampp or python to test as localhost

Demo Movie

Learn More

Goto Original


저작자 표시 동일 조건 변경 허락
신고
Creative Commons License
블로그 이미지

밤소 MidnightCow

위즈네트 칩(W5300, W5200, W7100, W7500) 개발자

World Domination Using Arduinos and Websockets

by kevinrohling



Overview

In this post, Author say that arduinos are tons of fun and recommend remotely controlling robot to you. And, Author recommend solutions how to remotely control robot. It is to use pusher, a real-time push notification service that runs over WebSockets.

Building the WebSocket Client

WebSockets are an interesting hybrid between HTTP and raw TCP connections. They start life very much like a normal HTTP GET request. In the request the client sends a bit information asking for an “upgraded” connection. Once the server sees this, if WebSockets are supported it sends a response back with a status code of 101 indicating that the connection was successfully upgraded. Then, and here’s where things diverge from HTTP, nobody closes the connection. Both the client and the server remain connected to each other. Here’s what this looks like at the socket level:

  • Client Requests a WebSocket Connection

    GET /app/yourpusherapikey?client=js&version=1.9.0 HTTP/1.1
    Upgrade: WebSocket 
    Connection: Upgrade 
    Host: ws.pusherapp.com:80 
    Origin: ArduinoWebSocketClient
    
  • Server responds indicating that the upgrade was successful

    HTTP/1.1 101 Web Socket Protocol Handshake
    Upgrade: WebSocket 
    Connection: Upgrade 
    WebSocket-Origin: ArduinoWebSocketClient 
    WebSocket-Location: ws://ws.pusherapp.com:80/app/yourpusherapikey?client=js&version=1.9.0 
    Connected
    

Controlling an Arduino Robot using Websockets and Pusher

Learn More

Goto Original


 

저작자 표시 동일 조건 변경 허락
신고
Creative Commons License
블로그 이미지

밤소 MidnightCow

위즈네트 칩(W5300, W5200, W7100, W7500) 개발자

WebSocket SVG Arduino and LabVIEW

by SocketMan



Overview

For the time being, this blog will be the only place I post this demo program. Of course you are free to repost or use the code however you wish. Just remember you will need a 100% Arduino-compatible controller (I used the Freetronics Etherten to test the code) with Ethernet or an Ethernet shield to properly run the demo. You will also need the above websocket server library for it to work. Here is a screenshot showing the WebPanel script, SVG document, and Arduino sketch in action:

The script and the little Etherten board work pretty well, as does Per’s websocket library. The WebPanel script is a modified version of the WebPanel 0.1 release. I added a three-line graph SVG object and associated message handler for that object type. I also added a FIFO buffer to the script to create a 100-point long moving “waveform chart” strip-chart style graph. The SVG document is stored on and launched from the host PC.

I made several attempts to create a sketch that serves up the SVG document and script from the Etherten’s micro SD card, but the little controller just does not have enough memory. Everytime I tried to create a File object from the SD library with the websocket server running, the controller abruptly halted. It only has 2K of RAM, and although I tried moving every string constant and char array object to program memory, there still was not enough room. So I plan to get a new controller, either an Arduino Due or a chiKit UNO32 with much more memory.

The goal is to connect my iPad and Kindle Fire HD and have the controller send the GUI SVG document and script. When I get that step finished, I’ll start with a clean slate and create and entirely new script that uses the best elements from all previous releases. The new script will be designed specifically for Arduino-like controllers, but also implement the “no pogramming required” original goal of designing web GUI’s using Inkscap and prebuilt SVG objects.

Getting Ready to Return with New WebPanel!

Sorry I have been away for so long. I’m getting ready to revamp WebPanel with some new graphics, elements and a complete binary or text option. I will split the Javascript engines into two separate scripts, one for text data, the other for binary, and will release both in a brand new version coming soon!!

Source code

https://github.com/ejeklint/ArduinoWebsocketServer

http://svn.evexiallc.com/webpanel/Arduino_Webpanel_Demo.zip

Demo Movie

Learn More

Goto Original


 

저작자 표시 동일 조건 변경 허락
신고
Creative Commons License
블로그 이미지

밤소 MidnightCow

위즈네트 칩(W5300, W5200, W7100, W7500) 개발자

티스토리 툴바