Using software serial library on an ATtiny to send serial via FTDI over USB (or bluetooth) for communication to computer. Useful for debugging!
// software serial example for ATtiny!
#include
SoftwareSerial mySerial(0, 1); // RX, TX
void setup()
{
// set the data rate for the SoftwareSerial port
mySerial.begin(4800);
mySerial.println(“Hello, world?”);
pinMode(3, INPUT_PULLUP);
}
void loop() // run over and over
{
int sensorValue = analogRead(3);
mySerial.println(sensorValue);
}
1 Comment so far
This is great, but could you do one on getting I2C working when using the arduino IDE to program an ATtiny2313 please?