Fritz! Boy: Serial communication between Arduino and Gameboy (GBDK)

by Marcel Imig



Overview

This project describes both the communication between an Arduino Mega and a UPNP capable router, as well as the serial communication between Gameboy and Arduino. This is a contribution for the “Pimp your Fritz!” Competition of the Maker Faire 2015 in Berlin. The conditions of participation are here. The finalists are on the site of AVM. The winners at Heise.

Required Component :

  • Gameboy (DMG) oder Gameboy Color 30 €
  • USB 64m Smart card (z.B. von hier) 50 €
  • Gameboy Link cabel 5 €
  • Arduino Mega 15 €
  • Arduino Ethernet Shield 10 €
  • Housing (Optional) 5 € ~100 €

How to Run

After the Arduino Mega microcontroller has received an IP address from the Fritz! Box, it sends a SOAP request to its default gateway. In this query, he queries the properties of the WAN interface and returns the maximum up- and download bandwidth (“NewLayer1UpstreamMaxBitRate” and “NewLayer1DownstreamMaxBitRate”). Next, he intermittently polls the current bandwidth usage every three seconds (“NewByteReceiveRate” and “NewByteSendRate”). The collected values ​​are converted into megabits and transferred to the gameboy every second via the serial interface. A game is played on the game board’s cartridge, which listens on the serial port and displays the last 50 received values on a scale.

Learn More

Goto Original, Language : German


 

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

밤소 MidnightCow

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

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


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

밤소 MidnightCow

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

Cosm and TMP100

by Fork Robotics



Overview

These posting point out collecting data. Also, this unwieldy mass of data needs to be logged, processed, stored and displayed in a reasonable way for it to be usable. Then, show how to create a feed and upload data reading from sensor an to Cosm via an Arduino Ethernet Shield.

All of the devices around us are starting to become data collection points. Every minute of every day many data points are generated. This unwieldy mass of data needs to be logged, processed, stored and displayed in a reasonable way for it to be usable. The question becomes how to do this. One solution for the DIY community is Cosm (formerly Pachub) that allows us to do just that for free. In this article I’ll show you how to setup an account, create a feed and upload temperature readings from an I2C temperature sensor to Cosm via an Arduino Ethernet Shield.

Materials :

  • Cosm Account
  • Arduino and Ethernet Shield or Arduino Ethernet
  • Breadboard and jumper wires
  • tmp100 (or other I2C temperature sensor) on a breakout board

Setup a Cosm Account

Cosm site is changed to Xively.

If you don’t already have one the first thing you need to do is setup a Cosm Account

  1. Go to https://cosm.com
  2. Click the big blue “Get Started” button
  3. Enter an email, username and password then click the “Sign up” button
  4. You’ll get an email with a link to verify your registration
  5. The link will bring you directly into your account
  6. Click on the big plus button
  7. Select Arduino
  8. Give the new feed a title and tags (optional) and press Create
  9. The Cosm Site will give you a sample sketch to upload data. You only need the three lines that start with:
    A. #define APIKEY
    B. #define FEEDID
    C. #define USERAGENT

Learn More

Goto Original

 

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

밤소 MidnightCow

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

SparkFun Ethernet Shield Quickstart Guide

by Jimb0



Overview

In this tutorial, we’ll cover how to get up and running with the SparkFun Ethernet Shield. Requirements, hardware, assembly, and programming will all be covered. Follow along, and your Arduino should be skimming Twitter and hosting webpages in no time!

Requirements:

  • Headers (and soldering tools)
  • An Ethernet cable
  • µSD Card (optional)
  • Arduino Development Board
  • Arduino Software

Hardware

  • The SparkFun Ethernet Shield is comprised of two stand-out components - a Wiznet W5100 TCP/IP embedded Ethernet controller and a µSD socket.

    • The W5100 is a powerful little chip, which implements all sorts of complex network protocols - TCP, UDP, ICMP, IPv4, ARP, IGMP, PPPoE, and the physcial Ethernet layer. This alleviates a lot of programming stress on us and memory stress on the Arduino. All of the communication between the W5100 and the Arduino is SPI-based and handled using the Ethernet library, which we’ll discuss in the firmware section below.

    • The W5100 is supported by a number of components - capacitors, a crystal, reset monitors - but most especially an Ethernet jack, actually a MagJack. Inside that little RJ-45 jack are a number of transformers and magnetics required for isolating Ethernet signals (you could say this jack is…more than meets the eye). There are even some LEDs poking out the end.

  • The µSD socket extends near the edge of the shield, where the card should be inserted. The socket sits next to a 74HC4050 (high-to-low level shifter), which handles all of the 5V-to-3.3V voltage shifting (those delicate µSD cards shouldn’t be subjected to 5V signals).

  • Some of the less spectacular components (don’t tell them I said that) on the Ethernet Shield include a reset button, 3.3V regulator, and a number of blinky LEDs. The reset button works just like the one the Arduino itself, though it’ll also reset the W5100. The LEDs include a power indicator LED, as well as a number of status LEDs (Ethernet receive/transmit, collision, and speed) tied to the W5100, which will appear to have a mind of their own.

Learn More

Goto Original


 

 

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

밤소 MidnightCow

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

Teleduino

by Teleduino



Overview

Teleduino converts your ethernet enabled Arduino into a powerful and versatile tool for interacting with devices over the internet. Not only that, but it makes it quick and easy.

Teleduino is now available for the Arduino Mega range of boards!

Once your Teleduino is configured, it automatically connects itself to the Teleduino server when powered on. The Teleduino server translates instructions received from the internet into actions on the Teleduino device.

Using the Teleduino platform, you can perform the following tasks with your Arduino via the simple web service:

  • Reset, ping, get uptime, get free memory.
  • Define pin modes, set digital outputs, set analog outputs, read digital inputs, read analog inputs, or read all inputs with a single API call.
  • Define up to 2 ‘banks’ (4 for the Mega) of shift registers. Each ‘bank’ can contain up to 32 cascaded shift registers, giving a total of 512 digital outputs (1024 for the Mega).
  • Shift register outputs can be set, or merged, and expire times can be set on merges (you could set an output(s) high for X number of milliseconds).
  • Define, and read and write from serial port (4 for the Mega).
  • Read and write from EEPROM.
  • Define and position up to 6 servos (48 for the Mega).
  • Interface with I2C (TWI) sensors and devices.
  • Set preset values for the above functions, which get set during boot. Preset values are stored in the first 178 bytes of the EEPROM (413 for the Mega).

Documentation

Learn More

Goto Original


 

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

밤소 MidnightCow

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

Controlling Arduino with iPod touch through WebSocket

by Yoshiyasu SAEKI



Overview

In this post, Author made an application with DeviceMotion Event and WebSocket in iPod touch. WebSocket server is written in Python/Tornado. So WebSocket message should be able to be relayed to other softwares or devices. Author tries to control Arduino device with iPod touch through WebSocket by moving ball in ipodtouch and getting ball data on Matrix LED.

Parts :

  • Matrix LED
  • ipod touch
  • Ehternet Shield
  • Arduino

Demo Movie

Learn More

Goto Original


 

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

밤소 MidnightCow

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

ArtNET DMX Node based on Arduino

by Caneira


Overview

The purpose of this article, based on an original project published in Blog Deskontrol Electronics, is to show how to build an Art-NET Node, based on the well known and well-known Arduino Mega, with capacity to control up to 4 DMX universes. This Node responds to all the basic messages of the Art-NET protocol, so any controller that respects the protocol will be able to detect it and use it as a DMX input/output device.

Materials Component name

  • Arduino Mega 2560 or Mega 1280
  • Arduino Ethernet Shield based on Wiznet W5100
  • Prototype Shiled, para montegem
  • Livraria Deskontrol 4 DMX
  • Arduino IDE V0023

Learn More

Goto Original

Translate site


 

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

밤소 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


 

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

밤소 MidnightCow

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

The thing system - Clients

by The Thing System



Overview

More complicated clients, one which monitor updates from the steward looking for changing conditions, and reacting to them on behalf of the user by asking the steward to perform actions, are entirely possible. Technically speaking these are intelligent agents working in a multi-agent system with shared goals of making life more convenient for the user. We like to think that we’re implementing magic.

Example code

  1. example clients, saying “Hello Lightbulbs”
var http = require("http");
var util = require("util");
var url = require("url");
var WebSocket = require('ws');

function onRequest(request, response) {    
    var ws;

    console.log("Request recieved.");
    var pathname = url.parse(request.url).pathname;
    response.writeHead(200, {"Content-Type":"text/html"});

    ws = new WebSocket('ws://127.0.0.1:8887/manage');
    console.log("Created websocket.");    

    ws.onopen = function(event) {
    console.log("Opened websocket to steward.");
    if ( pathname == "/on") {
        var json = JSON.stringify({ path      :'/api/v1/actor/perform/device/lighting', 
                                requestID :'1', 
                                perform   :'on', 
                                parameter :JSON.stringify({ brightness: 100, color: { model: 'rgb',         rgb: { r: 255, g: 255, b: 255 }}}) });
        ws.send(json);    
        console.log( json );

    } else if ( pathname == "/off") {
        var json = JSON.stringify({ path      :'/api/v1/actor/perform/device/lighting', 
                                    requestID :'2', 
                                    perform   :'off', 
                                    parameter :'' });            
        ws.send(json);
        console.log( json );

    } else {
        response.write("<h2>Unrecognised request</h2>");
        ws.close(); 
        response.end();
    }
};

ws.onmessage = function(event) {
    console.log("Socket message: " + util.inspect(event.data));
    response.write( "<h2>Turning lightbulb '" + pathname +"'</h2>" + util.inspect(event.data, {depth: null}));
    ws.close(); 
    response.end();

};

ws.onclose = function(event) {
    console.log("Socket closed: " + util.inspect(event.wasClean));
};

ws.onerror = function(event) {
    console.log("Socket error: " + util.inspect(event, {depth: null}));
    try { 
        ws.close(); 
        console.log("Closed websocket.");
    } catch (ex) {}
};

}

var server = http.createServer(onRequest).listen(9999);
console.log("Server started on port 9999.");</code></pre>
  1. Example using Arduino
    #include &lt;Dhcp.h;
    #include Dns.h;
    #include Ethernet.h&gt;
    #include EthernetClient.h&gt;
    #include util.h&gt;
    #include SPI.h;

    #include &lt;Base64.h&gt;
    #include &lt;global.h&gt;
    #include &lt;MD5.h&gt;
    #include &lt;sha1.h&gt;
    #include &lt;WebSocketClient.h;

const char *server = "192.168.1.91";

const int buttonPin = 7;
const int ledPin = 6;

int ledState = LOW;         
int buttonState;             
int lastButtonState = LOW;
int sentPacket = 0;

long lastDebounceTime = 0;  
long debounceDelay = 50; 

char *jsonOff = "{\"path\":\"/api/v1/actor/perform/device/lighting\",\"requestID\":\"2\",\"perform\":\"off\",\"parameter\":\"\"}";
char *jsonOn = "{\"path\":\"/api/v1/actor/perform/device/lighting\",\"requestID\":\"1\",\"perform\":\"on\",\"parameter\":\"{\\\"brightness\\\":100}\"}";
byte mac[] = { 0x0, 0xA2, 0xDA, 0x0D, 0x90, 0xE2 };  

EthernetClient client;
WebSocketClient webSocketClient;

void setup() {
  pinMode(buttonPin, INPUT);
  pinMode(ledPin, OUTPUT);  

  Serial.begin(9600);
  while(!Serial) {  }

  if (Ethernet.begin(mac) == 0) {
    Serial.println("Error: Failed to configure Ethernet using DHCP");
    while(1) {  }
  } 
}

void loop() {
  String data;
  int reading = digitalRead(buttonPin);

  if (reading != lastButtonState) {
    lastDebounceTime = millis();
  } 
  if ((millis() - lastDebounceTime) &gt; debounceDelay) {
    buttonState = reading;
    if ( buttonState &amp;&amp; !sentPacket ) {
       if ( ledState ) {
          Serial.println( "Turning lights off.");
          Serial.println("Connecting to steward...");
          if( client.connect(server,8887) ) {
            Serial.println("Connected");
            webSocketClient.path = "/manage";
            webSocketClient.host = "dastardly.local";
            if (webSocketClient.handshake(client)) {
                Serial.println("Handshake successful");
            } else {
                Serial.println("Handshake failed.");
                while(1) {
                  // Hang on failure
                }  
            }
            webSocketClient.sendData(jsonOff);
          }          

       } else {       
          Serial.println( "Turning lights on.");
          Serial.println("Connecting to steward...");
          if( client.connect(server,8887) ) {
            Serial.println("Connected");
            webSocketClient.path = "/manage";
            webSocketClient.host = "dastardly.local";
            if (webSocketClient.handshake(client)) {
                Serial.println("Handshake successful");
            } else {
                Serial.println("Handshake failed.");
                while(1) {
                // Hang on failure
                }  
            }
            webSocketClient.sendData(jsonOn);
          }                    
       }
       sentPacket = 1;
    }
  }

  if (client.connected()) {
    data = webSocketClient.getData();
    if (data.length() &gt; 0) {
      Serial.print("Received data: ");
      Serial.println(data);
      client.stop();
      if ( ledState ) {
          digitalWrite(ledPin, LOW);
          ledState = LOW;       
      } else {
          digitalWrite(ledPin, HIGH);
          ledState = HIGH;       
      }
    }
  }

  if ( lastButtonState != reading ) {
     sentPacket = 0; 
  }  
  lastButtonState = reading;
}

Learn More

Goto Original


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

밤소 MidnightCow

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

ADAM-4017 + RS485 + Arduino UNO + Ethernet Shield

by Michelle Seo



Overview

This poster briefly describes How to use the ADAM 485 I/F platform with Arudino Ethernet shield.
For example, He show Temporary Test Board(volume)+ADAM-4017+RS485+Arduino UNO+Ethernet Shield.

He explains how to use Arduino ethernet with as the below posts :

  • Testing: Temporary Test Board(volume) + ADAM-4017 + RS485 + Arduino UNO + Ethernet Shield
  • HTML / JavaScript - 4017 Arduino Gateway
  • Arduino Code - 4017 Arduino Gateway
  • ADAM - 4017 Arduino Gateway
  • Input Polling from Arduino - Web/Arduino/Adam
  • Input Polling from a Browser - Web/Arduino/Adam
  • HTML / JavaScript - Web/Arduino/Adam
  • Arduino Code - Web/Arduino/Adam
  • RS485 Shield - Web/Arduino/Adam
  • UNO, Ethernet Shield - Web/Arduino/Adam
  • ADAM - Web/Arduino/Adam

Materials

  • Temporary Test Board (for test)
  • ADAM 4017
  • RS485
  • Arduino UNO
  • Ethernet Shield

Learn More

Goto Original


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

밤소 MidnightCow

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