Hardware Open-Source
We are living more and more in times when free software and now free hardware are available to anyone, with cost-effective benefits. In software, there are no charges for values, after all, there is no raw material to build software, that is, there are no physical expenses, but only mental ones. This no longer occurs in the hardware version, where they require cards, capacitors, among others.
Arduino is a hardware-based open-source project development platform, with an IDE for Easy-To-Use development, where you can quickly program what you want through the sensor inputs found on the board.
This model is sold on a Brazilian website, and has a wide development platform in Linux, OS X and Windows.
System website:
http://arduino.cc/ (in English)
Brazilian reseller site:
http://www.unitecorp.eng.br
Before, closed and complicated systems, now uncomplicated with this system. The IDE platform can handle the easy-to-use form, or C language, by translating all instructions into C language, which is the controller board standard.
In addition, there are examples of ready-made programs, already running on your card on the manufacturer's website (in English), as a chat server:
http://arduino.cc/en/Tutorial/ChatServer
Chat Server
A simple server that distributes any incoming messages to all
connected clients. To use telnet to your device's IP address and type.
You can see the client's input in the serial monitor as well.
Using an Arduino Wiznet Ethernet shield.
Circuit:
* Ethernet shield attached to pins 10, 11, 12, 13
* Analog inputs attached to pins A0 through A5 (optional)
created 18 Dec 2009
by David A. Mellis
modified 10 August 2010
by Tom Igoe
*/
#include <SPI.h>
#include <Ethernet.h>
// Enter a MAC address and IP address for your controller below.
// The IP address will be dependent on your local network.
// gateway and subnet are optional:
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
byte ip[] = { 192,168,1, 177 };
byte gateway[] = { 192,168,1, 1 };
byte subnet[] = { 255, 255, 0, 0 };
// telnet defaults to port 23
Server server(23);
boolean gotAMessage = false; // whether or not you got a message from the client yet
void setup() {
// initialize the ethernet device
Ethernet.begin(mac, ip, gateway, subnet);
// start listening for clients
server.begin();
// open the serial port
Serial.begin(9600);
}
void loop() {
// wait for a new client:
Client client = server.available();
// when the client sends the first byte, say hello:
if (client) {
if (!gotAMessage) {
Serial.println("We have a new client");
client.println("Hello, client!");
gotAMessage = true;
}
// read the bytes incoming from the client:
char thisChar = client.read();
// echo the bytes back to the client:
server.write(thisChar);
// echo the bytes to the server as well:
Serial.print(thisChar);
}
}
See that programming the system is very simple.
On the blog: http://arduino.cc/blog/2011/01/10/wifi-enabled-whole-house-power-meter/ they put the system to monitor the electricity of a home.
Read more at: Hardware Guide: http://www.guiadohardware.net/artigos/arduino/
No comments