For this week the exercise is about designing and building a wired /or wireless network connecting at least two processors.
Unfortunatly I'm really in late with the all assignements of the academy and I'm not going to explore anything more interesting than let to communicate two
different arduino.
I follow the steps Gianluca Pugliese made last year during the same
week.
I took two Arduino 1,
- actually a GenuinoUNO from genuino.cc and an ArduinoUNO from arduino.org -
and I connected them between two pins, RX as digital pin 10 (connect to TX of other device) and
TX as digital pin 11 (connect to RX of other device).
/*
Fab Academy 2015
Networking communication
Gianluca Pugliese
Pierluigi De Palo
Chat Program between 2 satshakit
The circuit:
* RX is digital pin 10 (connect to TX of other device)
* TX is digital pin 11 (connect to RX of other device)
based on SoftwareSerial
*/
#include SoftwareSerial.h
SoftwareSerial chat(10, 11); // RX, TX
int text;
void setup()
{
// open hardware serial, TX = 1, RX = 0
Serial.begin(9600);
Serial.println("Fab chat is starting...");
// set the baudrate
chat.begin(9600);
delay(1000); // delay 1s to stabilize serial ports
chat.println("connected! start to chat");
}
void loop()
{
if (chat.available())
Serial.write(chat.read());
if (Serial.available())
{
Serial.print("Gianlu: ");
chat.write("Gianlu: ");
while (Serial.available())
{
text = Serial.read();
chat.write(text);
Serial.write(text);
}
chat.println();
Serial.println();
}
}
Apart from some notification about the UNCERTIFICATION of one of the boards, everything its working good.