This week assignement is about Input devices, My circuit is reading potentiometer 10k and output value on serial communication port. I desiged the satshakit board add two 2X1 pin header for vcc and GND.
shashkit_potentiometer_schematic and board.
I downloaded atmega 328P AU for eagle from element 14 website. add it to eagle library and acivate for use please see the steps in electronics design project
shashkit_potentiometer_board
note that this board doesnt seem ready for milling the pins on the top and down are connected. I previousely designed and milled a satshakit and bridge in one design board in final project section but this board didnt work and I decided to make two separate boards to facilitate the debugging please check the final project page. here I download the satshakit board and add the two pins for power and two for ground. here are the pictures
stuffing the board
programing the board with arduino as isp
I upload arduino isp example in arduino board, I connect sashakit with arduino ISP (arduino 10--> rst, arduino 11-->MOSI, arduino 12-->MISO, arduino 13-->sck, arduino 5V-->VCC, arduino GND-->GND). to upload the bootloader I choose the board arduino uno, COM port of arduino isp and arduino as isp as the programmer. details are in this tutorial after many tries I was able to upload the bootloader
Code
in the arduino IDE code I set an Input potentiometer in A0 read value from keyboard and print using serial comunication baud rate 9600
int potPin =0, setting A0 as an input variable , here to declare variable and constant in the program; in setup()I define input/output ports serial comunication baud rate, pinMode(potPin,INPUT)here I set the potentiometer pin as input, Serial Begin (9600) allow to listen to serial communication with satshakit, in loop() is the code that run continualtely, here Serial.println(analogRead(potPin)) is to print on the screen alog value read in A0 value of potentiometer, delay(1000) is delay 1S between values read to be able to read values from screen
result on video
To download design on eagle and png files.
here is the design board on eagle
here is the shematic board on eagle
here is input device board traces
here is input device board outline
here is potentiometer program in arduino IDE