WEEK ASSIGNMENT:

 

Networking and Communications

 

Design and build a wired &/or wireless network connecting at least two processors

For this assignment I will connect one Arduino Uno with my microcontroller Attiny 84 that I made in Assignment 6.

 

One of the professors here at Fablab Puebla: Huber GirĂ³n explained to us three different types of networks: UART (Universal Asynchrnous Receiver/Transmitter), SPI (Serial Peripheral Interface) and i2C.

 

I decided to use UART.

 

STEP 1: Devices that I will connect.  Both of my devices have connection to Tx Rx.

 

My Attiny84 has a bluetooth connection, a button and a led.  My Arduino will be connected to a button and a LED through a protoboard.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

20160517_211813
20160517_211447

Step 2: Determine the Scheme of connection and components

 

(OUTPUT) Led at the ARDUINO (and similarly with the Attiny84):  Pin of Arduino --> resistor -->(+)Led -->Gnd

 

(INPUT) Button at the ARDUINO (and similarly with the Attiny84):   GND-->RESISTOR -->Pin of Arduino --> Button --> VCC

 

Txd of Arduino --> Rxd of Attiny

Rxd of Attiny  --> Txd of Arduino

Step 3:  Program the Attiny

 

First we have to set the Arduino as a programmer and then program the Attiny84 and then program the Arduino with the necessary component.

Step 3.1 Setting the Arduino as a programmer

1. Open File --> Examples --> ARduino ISP

2. TOOLS -->BOARD --> ARDUINO

3. TOOLS --> PORT --> ARDUINO/GENUINO UNO

4. TOOLS --> PORT --> PROGRAMER --> AVRISP MKLL

THEN UPLOAD IT

 

 

STEP 3.2. PROGRAM MY BOARD WITH THE ARDUINO THROUGH THE ISP

 

1.  CONNECT THE ISP; i.e: miso with miso, Vcc with Vcc, MOSI WITH MOSI, SCK WITH SCK , GND WITH GND and the Rst of my circuit with port 10.

 Upload the program in the Attiny

a. Write the program (link)

b. Tools --> Board --> ATiny

c. Tools --> Processor ->Attiny84

d. Tools --->Clock --> 1Mhz

e.  Port --> COM5/ARDUINO/GENUINO/UNO

d. Tools -->Programmer -->Arduino as ISP

 

Initially I made a mistake with the port, I set the button at the port 0 and it is at the port 10

 

 

Step 3.3  Program the Arduino

Connect Port 1 (Tx) of the Arduino with port 0 of the Attiny (Pin1)

Connect Port 0 (Rx) of the ARduino with port 1 of the Attiny (Pin 2)

Connect Gnd on the Attiny with the ARduino

Connect VCC on the Attiny with the Arduino

 

 

 

 

Set correctly the Connections

Tools --> Board --> Arduino

Port --> Com5- Arduino /Genuino Uno

Programmer --> AVRISP MKL

 

 

 

 

 

 

 

 

 

20160522_222203