1.Group Assignment
2. Individual Assigment.
This week's assignmet was about programming the Echo Hello-World board we made on week 07 to do something. To be honest, at the begining it was difficult for me to start with this assigmnet because it was my first time dealing with microcontrollers and programing languages. But, thanks to the information i read on the data sheet, some video tutorials I found, a codecademy begginer's Python course and help from my coworkers; I know understand the basic information to start with the assigmnet.
It is important to have some infomation related on microcontrollers. What I learnt is, depending on the amount of PINS it has its capabilities will be different, we can attach to them power conections, communications connections and input and output conections. Each PIN has a name and especific functions. The microcontroller used for this assignment was the ATtiny44, it has 14 PINS and in the
On
Recognized what are the equivalences between the ATtiny44 and Arduino PINS:
Image retrieved from:
Installing the ATtiny support:
I wanted to test a Morse Code with my board so I looked up some examples and I found a
I decided to write the code for
Hello Morse Code from alucyem on Vimeo.
I wanted to try other languages so I took a
I set up the breadboard with: the Adafruit Pi Cobbler with GPIO cable, 1 Diffused 10 mm Red LED, a resistor & 02 jumper wires.
I tested the same message "HELLO" on Morse Code and the funtions I used where:
import RPi.GPIO as GPIO import time GPIO.setmode(GPIO.BCM) GPIO.setup(18,GPIO.OUT) def punto(): GPIO.output(18,GPIO.HIGH) time.sleep(1.5) GPIO.output(18,GPIO.LOW) time.sleep(1) def n_puntos(n): for x in range (0,n): punto() def raya(): GPIO.output(18,GPIO.HIGH) time.sleep(4) GPIO.output(18,GPIO.LOW) time.sleep(1) def n_rayas(n): for x in range (0,n): raya() def loop(): #H print "H" n_puntos(4) time.sleep(1) #E print "E" punto() #L for x in range (0,2): print "L" punto() raya() n_puntos(2) time.sleep(1) #O print "O" n_rayas(3) time.sleep(1) ####while True: ## loop() ## print('end loop') ##if __name__ == "__main__": loop()