I'm trying to use my Arduino Uno as an ISP to program an ATTiny85 and at the same time check my board by using the SoftwareSerial library to output the values I'm getting from my sensor.

Is this actually possible? Or does it require 2 different setups? Because I found a lot of tutorials and threads about one or the other, but never both. Which I find odd because once you send your program to the chip you might want to test it as well (or debug it).

Many thanks for your help and input! :)

  • 1
    Sure you can. You'd need to modify the ArduinoISP sketch to include whatever serial functionality you desire. – Majenko Jan 20 '19 at 14:08
  • Would adding a code like that work for example? #include <SoftwareSerial.h> char anyChar; void setup(){ Serial.begin(9600); //to serial monitor Serial1.begin(9600); //connected to Attiny (RX to tx and TX to rx) } void loop(){ if(Serial1.available() >0) { anyChar = Serial1.read(); Serial.print(anyChar); } } – Mugen Jan 20 '19 at 16:15
  • Possibly, though it may interfere with ISP programming. You should provide a facility (maybe a switch connected to a GPIO pin) to switch between programming and testing mode. – Majenko Jan 20 '19 at 18:59
  • To keep things simple I would recommend using two Arduino's. One for the ISP and one for the test harness. Alternatively @Majenko's suggestion using a GPIO pin and switch to toggle between to two modes (programming and test harness). – Mikael Patel May 28 '19 at 12:55

I'm not really sure, but in the Arduino ISP example there is an if that looks if the ISP is in program-mode. You could try adding in the else statement of that if the Software Serial part.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.