This homework was composed by two assigments:
I have decided to work with Atmega328p, you can download the datasheet here.
The main features of ATmega328p are:
The Atmega328p-au architecture is based on the RISC architecture.
The pinout of this microcontroller is presented in the next Figure. The port B, C and D are programmable with multipurpose.
I make a Fabduino v2 , after milling and soldering the board, it shows in right image.
In order to connect the FabISP and FTDI write, in my case I forgot the position of pins MISO/RESET/MOSI/GND/VCC so I have check the diagram of fabduino and fabisp. The pin 13 is SCK, pin 12 MISO, pin 11 MOSI and RESET, VCC and GND are connected in the same pins fabISP/Fabduino. After connecting the wires and FTDI, we have lunched Arduino IDE to program atmel328. So we must edit the environment settings with :
I found a platform to program over Atom which is called PlatformIO IDE. It was installed following the tutorial The steps are followed to install are:
The blink led project with platform is created in the next steps:
We install the package Python-Arduino-Command API according this tutorial. The first step was install the package with the command pip install arduino-python . We have developed a blink led using port /dev/cu.usbserial-FTGZIDCK . The source code shows in left side. Also, you can download the source, here
from Arduino import Arduino import time board = Arduino('9600',port="/dev/cu.usbserial-FTGZIDCK") #plugged in via USB, serial com at rate 9600 board.pinMode(13, "OUTPUT") led_pin = 13 while True: board.digitalWrite(led_pin, "LOW") print "LOW" # confirm LOW (0) time.sleep(1) board.digitalWrite(led_pin, "HIGH") print "HIGH" # confirm HIGH (1) time.sleep(1)