I already experimented earlier with these small boards with chip that can be programmed easy by putting it in the USB connector of your computer.
These boards come (standard) with Dupont connectors (male or female) that you can solder on these small boards to conello Digispark!
nect it easy in experiments. I wanted a not connecting each time Dupont wires, a little bit more protection for the USB module more distance from my computer,.
To prepare a module i cut some wires with female Dupont connectors and soldered this directly to the module. (To prevent shortcuts i used female not the male).
With transparent heat shrink i added some protection for the board.
ATTiny PINs
On the side (bottom of the picture) are three connections (starting from USB)5V | (Color of my wire: ) Red |
GND | (Color of my wire: ) Black |
Vin | (Color of my wire: ) Brown |
Digital | - | Analog | PWM | I2C | PSI | Color of my wire |
P0 | (LED on model B) | Aref | PWM0 | SDA | MQSI | White |
P1 | (LED on model A) | PWM1 | MISO | Violet | ||
P2 | A1 | SCL | SCK | Blue | ||
P3 | USB+ | A3 | xx | Green | ||
P4 | USB- | A2 | PWM4 | xx | Yellow | |
P5 | (Reset on some models) | A0 | xx | Orange |
A simple blink script to test the module is
// the setup routine runs once when you press reset:
void setup() {
// initialize the digital pin as an output.
// pinMode(0, OUTPUT); //LED on Model B
pinMode(1, OUTPUT); //LED on Model A or Pro
}
// the loop routine runs over and over again forever:
void loop() {
// digitalWrite(0, HIGH); // turn the LED on (HIGH is the voltage level)
digitalWrite(1, HIGH);
delay(500); // wait for a second
// digitalWrite(0, LOW); // turn the LED off by making the voltage LOW
digitalWrite(1, LOW);
delay(500); // wait for a second
}
The led on my module reacts on P1. So I expect i have a model A.
No comments:
Post a Comment