Russound RNET to Sonos Bridge (Arduino MEGA) – Part 2

by DannyMav @Mavromatic



Overview

While it was possible to use an Arduino duemilanove (Atmel 328 chipset) for this project (See Part 1), He was really limited due to the 2K of RAM. It was fun trying to optimize code to get things to run in that amount of memory, however, it caused me to not be able to expand on functionality and features. He has upgraded the project to an Arduino MEGA (Atmel 1280 chipset). This platform gives him up to 8K of RAM — which should be more than enough memory (famous last words).
A lot of people have asked him to explain what exactly he’s doing with the Arduino. It’s pretty simple. First, He’s using a RS232 shield (not shown) to capture RS232 commands from the Russound Controller. When a key is pressed on the Russound keypads He read the RS232 data and either ignore or react to the events. Currently, He’s looking for +, -, Next, Previous, Play/Pause, Menu events. He plans on using the Menu button to offer deeper content browsing menus (need to sniff the RS232 or wait for Russound to publish protocol). The + & – buttons will allow to scroll playlists and the rest of the transport buttons are self explanatory.

  • Example RNET Next Track Event
F0 0 7D 7 0 0 7F 5 2 1 0 2 1 0 E 0 0 1 7 0 1 2A F7

Since the Sonos is a uPnP based system there is no IR or way to traditionally control it. Everything needs to be done via HTTP calls. He’s using an Ethernet Shield to translate the RS232 events to uPnP messages. The biggest challenge has been parsing the huge amounts of VERY VERBOSE SOAP-based notification messages. He parses the data real time, looking for strings that He want to store (things like playstate and metadata).
To make matters worse, Sonos is URL encoding XML data inside of an XML structure. So writing a simple XML parser is not possible. You have to look for things like &lt; for a less-than bracket (<). There were times I wanted to scrap the whole project because of this due to the limited RAM and string utilities — it really makes things a lot harder to deal with.

  • Example of nested URL encoded XML
&lt;Event xmlns="urn:schemas-upnp-org:metadata-1-
0/AVT/" xmlns:r="urn:schemas-rinconnetworks-com:metadata-10/"&gt;
&lt;InstanceID val="0"&gt;&lt;TransportState val="PLAYING"/ 

Demo Movie

Learn More

Goto Original


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

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


 

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

밤소 MidnightCow

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

How to wire and test your Arduino + Ethernet Shield

by Zugiduino



Overview

This post show how to wire and connect with Ethernet Shield, And how to test your Arduino board with Ethernet Shield by using a simple web-server example.


In this post, he will focus on how to wire Arduino UNO R3 to Arduino LAN Ethernet Shield R3 and Arduino MEGA R2 to Arduino LAN Ethernet Shield, then test whether it works or not.

Notice that, he will only use Serial Cable, Arduino UNO R3, Arduino MEGA R2, and Arduino LAN Ethernet Shield R3 as the model, because there comes a lot of problem when deals with them, so I hope this guidance will help you. Here, the good idea is we do not need to use any ethernet cable.

Arduino UNO

Here is the wiring from UNO to Ethernet Shield:

Connect ICSP (UNO) to ICSP Header (Eth Shield) with common arrangement.
Then, pin 4 to pin 4 and pin 10 to pin 10. That’s all !

Arduino Mega

Refer to 1st picture.

Wiring them, from ICSP to ICSP header with common pin arrangement, then pin 4 to pin 4 and pin 10 to pin 10, that’s all!

Learn More

Goto Original


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

밤소 MidnightCow

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

티스토리 툴바