2024-10-26 01:22:23 +02:00
|
|
|
// Code pour l'Attiny85
|
2024-10-26 00:54:07 +02:00
|
|
|
#include <SoftwareSerial.h>
|
|
|
|
|
|
|
|
SoftwareSerial mySerial(NULL,7); // RX, TX
|
|
|
|
|
|
|
|
uint8_t redLED = PB1;
|
|
|
|
|
2024-10-26 00:56:47 +02:00
|
|
|
void setup() {
|
2024-10-26 00:54:07 +02:00
|
|
|
mySerial.begin(9600);
|
|
|
|
pinMode(redLED, OUTPUT);
|
|
|
|
digitalWrite(redLED, LOW);
|
|
|
|
}
|
|
|
|
|
|
|
|
void loop() {
|
|
|
|
digitalWrite(redLED, !digitalRead(redLED));
|
|
|
|
delay(100);
|
|
|
|
mySerial.print("1");
|
|
|
|
digitalWrite(PB2, HIGH);
|
|
|
|
delay(100);
|
|
|
|
mySerial.print("2");
|
|
|
|
digitalWrite(PB2, HIGH);
|
|
|
|
delay(100);
|
|
|
|
|
|
|
|
}
|