Introduction: Mini Arduino PC [Eng-Ita] How to & Code

Sono stato libero per un fine settimana e ho deciso di rispolverare un vecchio mito, l'arduino. ho messo insieme un atmega standalone tre bottoni un led e un lcd... e ho creato quello che mai avrei pensato di creare. Un manuale di fisica con le formule, un termometro, un esposimetro, un Vu Meter, e Un Videogioco ( brick Breaker).

I have been free for a weekend, so i decided to revive my arduino. i've setted up some stuffs like an arduino standalone, an lcd , tre button and a led. I've never thought that i can create a real computer. It can be a thermometer, or  an exposimeter, also a Vu Meter it includes also a videogame and a phisics manual!

Let's have some fun... Pics, Pics and Pics

Step 1: OOOOKKK Ecco Il Codice.

Incominciamo insieme...


Here is The First ( Master Code ) :
http://pastebin.com/FfAUMj0H
Here is The Second ( Slave (stupid)(bargraph) Code ) :
http://pastebin.com/AwQkG9k8


The first code is for the computer that elaborate the data from the sensor and print via seria with this method:
if analog input= 5.00 V = 1024 but in serial comunication we can only send a byte per time so 1024 is equal to 1, 0 ,2 ,4 and for the arduino this doesn't mean anything so we must put numbers between 0-9 how many leds we have... let me think, YES! 10 so 0 is for the first 1 for the second and 9 is for the 10th... but how to covert 1024 in 9 and 0 in 0 and 300 in 3... well you need to do only two operations, if 0<x<1024    (((x)*9)/1024)= 0<x<9 here we are...


Il primo codice è per il computer principale che elabora i dati analogici e li printa su seriale con il seguente metodo:
se l'analogico risulta 5V =1024 ( 8 bit di risoluzione) quindi come convertiamo questo valore a un valore che il seriale possa leggere? semplice il seriale scompone il numero per esempio 1024 e invia cifra per cifra quindi otterremo 1 poi 0 poi 2 poi 4 che per l'arduino non hanno senso, allora come facciamo? semplice con una proporsione = due operazioni ... se noi facciamo in modo da printare un solo numero su seriale? cioè 0-9 sono 10 numeri... e quanti led abbiamo... 10!!! perfetto quindi  se 0<x<1024    (((x)*9)/1024)= 0<x<9
 e il problema è risolto...

Step 2: Demo Video...

First video: 





The Second One: