17
Sep 12

WE MAKE IT – The Manual

This is the main entry point to the content of the KIT.

The first task that you have to manage is to check the list of the components included in the kit.

!!DISCLAIMERS!! the microcontroller should be connected only to a computer using the USB provided with the kit, other powersupplies will broke the microcontroller. The kit should be used with a supervision of an adult. The usage of the kit with different experiments, if not done correctly, can broke the microcontroller.

The content is in English, will be available soon in Albanian, Macedonian and Italian.

Table of contents:

Chapter 01 – INTRO
Chapter 02 – ELECTRONICS IN BRIEF
Chapter 03 – A SMALL PROGRAMMING PRIMER
Chapter 04 – THE BREADBOARD
Chapter 05 – HARDWARE INSTALLATION
Chapter 06 – INSTALL THE SOFTWARE
Chapter 07 – MICROCONTROLLER, PINS AND LAYOUT
Chapter 08 – Experiment 01 – BLINKING LED
Chapter 09 – Experiment 02 – TRAFFIC LIGHTS
Chapter 10 – Experiment 03 – LIGHT SENSOR
Chapter 11 – Experiment 04 – TEMPERATURE SENSOR
Chapter 12 – Experiment 05 – PUSHBUTTON
Chapter 13 – Experiment 06 – INTEGRATED CIRCUIT
Chapter 14 – Experiment 07 – MATH IS FUN!
Chapter 15 – Experiment 08 – INTERACTIVITY
Chapter 16 – Experiment 09 – STORE DATA FOR LONG TERM
Chapter 17 – Experiment 10 – FADING LEDS
Chapter 19 – Experiment 11 – DISCO PARTY (RGB LED)
Chapter 20 – Experiment 12 – IS MY CHOICE
Chapter 21 – Experiment 13 – DIODE
Chapter 22 – Experiment 14 – PLAY WITH STRINGS
Chapter 23 – Experiment 15 – A SIMPLE NETWORK WITH TWO WIRES
Chapter 24 – Experiment 16 – ASCII TABLE
Chapter 25 – Experiment 17 – DATALOG TEMPERATURE
Chapter 26 – Experiment 18 – SMOOTHING WHEN READING DATA
Chapter 27 – Experiment 19 – HELLO! HELLO! HELLO!
Chapter 28 – Experiment 20 – POTENTIOMETER
Chapter 29 – Experiment 21 – SURPRISE 1
Chapter 30 – Experiment 22 – SURPRISE 2
Chapter 31 – Experiment 23 – SURPRISE 3
Chapter 32 – Experiment 24 – SURPRISE 4
Chapter 33 – Experiment 25 – SURPRISE 5

If you want to help us to speed up the translation process or to improve the quality of the manual, please contact us.


16
Sep 12

Chapter 07 – MICROCONTROLLER, PINS AND LAYOUT

Mini-B USB Jack is where you connect the USB cable to yor computer

D2-D12 are the digital pins (Input/Output). In the experiments are mentioned as D(number).

A1-A7 are the analog pins (Input/Output). In the experiments are mentioned as A(number).

GND is the Ground pin.

5V
is the 5 Volts pin.

3V3
is the 3.3 Volts pin. Continue reading →


15
Sep 12

Chapter 24 – Experiment 16 – ASCII TABLE

This experiment will print out all the ASCII table (that is visible) to the serial console.

To setup the serial console, execute the code in the microcontroller and click Serial Monitor under Tools menu.

/*
ASCII table

Prints out byte values in all possible formats:
* as raw binary values
* as ASCII-encoded decimal, hex, octal, and binary values

For more on ASCII, see http://www.asciitable.com and http://en.wikipedia.org/wiki/ASCII

The circuit:  No external hardware needed.

created 2006
by Nicholas Zambetti
modified 9 Apr 2012
by Tom Igoe

This example code is in the public domain.

<http://www.zambetti.com>

*/
void setup() {
//Initialize serial and wait for port to open:
Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect. Needed for Leonardo only
}

// prints title with ending line break
Serial.println(“ASCII Table ~ Character Map”);
}

// first visible ASCIIcharacter ‘!’ is number 33:
int thisByte = 33;
// you can also write ASCII characters in single quotes.
// for example. ‘!’ is the same as 33, so you could also use this:
//int thisByte = ‘!’;

void loop() {
// prints value unaltered, i.e. the raw binary version of the
// byte. The serial monitor interprets all bytes as
// ASCII, so 33, the first number,  will show up as ‘!’
Serial.write(thisByte);

Serial.print(“, dec: “);
// prints value as string as an ASCII-encoded decimal (base 10).
// Decimal is the  default format for Serial.print() and Serial.println(),
// so no modifier is needed:
Serial.print(thisByte);
// But you can declare the modifier for decimal if you want to.
//this also works if you uncomment it:

// Serial.print(thisByte, DEC);

Serial.print(“, hex: “);
// prints value as string in hexadecimal (base 16):
Serial.print(thisByte, HEX);

Serial.print(“, oct: “);
// prints value as string in octal (base 8);
Serial.print(thisByte, OCT);

Serial.print(“, bin: “);
// prints value as string in binary (base 2)
// also prints ending line break:
Serial.println(thisByte, BIN);

// if printed last visible character ‘~’ or 126, stop:
if(thisByte == 126) {     // you could also use if (thisByte == ‘~’) {
// This loop loops forever and does nothing
while(true) {
continue;
}
}
// go on to the next character
thisByte++;
}


15
Sep 12

Chapter 15 – Experiment 08 – INTERACTIVITY


15
Sep 12

Chapter 16 – Experiment 09 – STORE DATA FOR LONG TERM

The EEPROM, Electrically Erasable Programmable Read-Only Memory, is a device that allows to save some data and avoid to erase them when the microcontroller is disconnected from the power source. In few words, we can store our data for a longer time.

With this experiment we will see how the EEPROM can be used to read data, write data and erase the EEPROM content. The only important thing that we have to consider is that the EEPROM used with the microcontroller has a life cycle of 10.000 erases, this means that we have to consider quite carefully how that device canshould be used. The most common use is to save configuration data of the program loaded in the microcontroller.

In one of the next experiments we will create a simple temperature data logger.

The experiment is composed of three parts, one for writing simple data to the EEPROM, one for reading the data that was written before and the last one to clean (literally erase) the memory of the EEPROM.

/*
* EEPROM Experiments – WMKIT Experiment n. 09
*
* This example code is in the public domain.
*
* clearEEPROM
* Sets all of the bytes of the EEPROM to 0.
*
* readEEPROM
* Read all of the bytes of the EEPROM from 0.
*
* writeEEPROM
* Write all of the bytes of the EEPROM from 0.
*
*/

#include <EEPROM.h>

void setup() {
Serial.begin(9600);

clearEEPROM();
writeEEPROM();
readEEPROM();

}

void readEEPROM() {
int i;

for (i = 0; i < 512; i++) {
value = EEPROM.read(i);

Serial.print(a);
Serial.print(“\t”);
Serial.print(valu e);
Serial.println();

delay(500);
}
}

void writeEEPROM()
{
int i;

for (i = 0; i < 512; i++) {
EEPROM.write(i, 0); // one byte can keep values from 0 to 255
}

// turn the LED on when we’re done
digitalWrite(13, HIGH);
}

void clearEEPROM()
{
// write a 0 to all 512 bytes of the EEPROM
for (int i = 0; i < 512; i++)
EEPROM.write(i, 0);

// turn the LED on when we’re done
digitalWrite(13, HIGH); // The led is on the microcontroller
}

void loop()
{
// There is nothing is here!!
}


istanbul evden eve nakliyat istanbul evden eve nakliyat istanbul evden eve nakliyat sarıyer evden eve nakliyat beylikdüzü evden eve nakliyat şişli evden eve nakliyat