Show Posts
Pages: [1]
1  Using Arduino / Microcontrollers / Re: SoftwareSerial with ATTiny84 using ATtiny library on: October 04, 2012, 10:05:26 am
Just a little follow-up. I was able to get output with KnockBang. I have attached the led to attiny's pin 3 and the button to pin 0. This does not interfere with the programming via Arduino Uno.
And writing and reading from EEPROM works too smiley I needed to convert values with int() and byte().
2  Using Arduino / Microcontrollers / Re: SoftwareSerial with ATTiny84 using ATtiny library on: October 04, 2012, 09:37:21 am
No problem. I set TinyISP to use SoftwareSerial again. I do get output with your sketch, but it is not legible.
The second problem is - I have a push button and an led. I need to connect both to the attiny without interfering with the other pins used for programming. So far I have tried pin 3 for the led and pin 2 for the button, but this breaks my code - i.e. it behaves weird. If I disconnect all jump wires and attach the led to pin 1 and the button to pin 0, it works - but I obviously don't get any output.
I am doing all this because I want to save a value to the tiny's EEPROM and I am using the button to enter a "settings mode". Then I am using the led as a visual feedback for the user so he knows which value has been saved. Upon reset I want to load the value from EEPROM and blink the led n-times according to the saved value. This fails and I don't know why.
This was my initial reason to search for a way to print the debug output from the tiny to check the EEPROM value.
3  Using Arduino / Microcontrollers / Re: SoftwareSerial with ATTiny84 using ATtiny library on: October 04, 2012, 08:50:52 am
Thanks Erni, I also tried pin3 (analog input). But it didn't work. I think it isn't enough to set it to OUTPUT then?
4  Using Arduino / Microcontrollers / Re: SoftwareSerial with ATTiny84 using ATtiny library on: October 04, 2012, 07:43:21 am
Just a quick note and a question.
I have the exact same setup as Erni. I wasn't able to get any output when using SoftwareSerial. The code was running on the target (ATTiny85) but there was no output. Monitor enabled with "!" and "#" for restarting the tiny works.

I then tried to use TinyDebugKnockBang. When I put the header and implementation files into my sketches folder (inside the TinyDebugKnockBang directory), the Arduino IDE isn't able to pick it up (after restarting).
It just states that "Debug." isn't declared.
Since I am on a Mac, I have put the TinyDebugKnockBang directory directly inside the Arduino.app/Contents/Resources/java/libraries. Now it works and I get the desired output.

Whats weird though, when I try the same blink example as Erni (just changed the led pin to 1 for the tiny), I get output as long as I don't connect the LED. When I connect it, the serial monitor prints:
--- Knock-Bang fault: 15 ---


Thanks
Stefan
Pages: [1]