Go Down

Topic: SoftwareSerial with ATTiny84 using ATtiny library (Read 114153 times) previous topic - next topic


I got the SOftwareSerial.h to work. For some reason it was not in my libraries!. Still want to get the Knock-bang working


This is what i have in the _TinyISP_BuildOptions.h tab when using KnockBang.

Code: [Select]
//Set to 1 if using KnockBang and comment out #include <SoftwareSerial.h> in TinyISP

//Set to 1 if using Serial Relay, and uncomment #include <SoftwareSerial.h> in TinyISP
//Transmit on Arduino is A0

And in the TinyISP tab I comment out #include <SoftwareSerial.h>

Code: [Select]
//#include <SoftwareSerial.h>




It is a straight copy from the example on page 3 of this post

#include <TinyDebugKnockBang.h>

void setup( void )
  Debug.begin( 250000 );

void loop( void )
  Debug.println( F( "Caitlin! " ) );
  delay( 1000 );


I'm not sure what you're asking about and certainly not in the last section.

To get started with Knockbang, here is what I do:

In  _TinyISP_BuildOptions_h i put these lines:

I couldn't figure out all day what I was doing wrong with my tiny24. Then I tried putting those lines in _TinyISP_BuildOptions.h instead of where I had them before. I must have read the instructions wrong.


i've got some problems with the attiny and software serial. I made a little RGB Blutetoth control via smatrphone like seen many times before. Everything works fine with my nano board. Now i wan't to port this to an Attiny85.
But it didn't work. I send via Smartphone Like 255x255x255 and use parseint() in arduino. Like seen in the Documentation.
I used Pin 0,1,4 as Pwm output and 3 for rx. I'm getting no erros while compiling and uploading but the values are not stored right trough serial.parseint. I'm using Low to High tech cores. And also tried this https://code.google.com/p/arduino-tiny/ where i get compiling erros. I've searched and tryed many things but an't get this to work.


having the same problem when i use Attiny85 with BLE to communicate with android app , it shows the value like 0FF FF 00 FF.. . i also used Software Serial library with attiny.
Is there a solution to this problem?


Hey this is great!

I'm fond of programming the ATTiny85 and I figured out a while back that I could flash it from a teensy. I had a spare Teensy 2.0 around and put it on a breadboard with a few jumpers. I had to make some minor modifications to the OOTB ArduinoISP to get the teensy pins right but that was all.

My earlier efforts never gave me any debug tools. This gives me Serial.println() which is probably all I need (and a huge step up from what I had). I had to do a couple of things to get it working for me:

1) TinyISP_SelectedBuildOptions.h line 196 changed/ensured RELAY_KNOCK_BANG_ENABLED was 1
2) TinyDebugKnockBang.h: I had to comment out line 52

I'm using the '85 with 1Mhz and it's working fine. here's my test sketch (not so different from the others...):
Code: [Select]
  Turns on an LED on for one second, then off for one second, repeatedly.
  Use 1Mhz for sensible timing, higher Mhz will make the light stay on but not blink
  This example code is in the public domain.
#define KNOCK_BANG 1
#include <TinyDebugKnockBang.h>
#define Serial Debug

#define LED_PMODE 4

void setup() {
  // initialize the digital pin as an output.


void loop() {
  digitalWrite(LED_PMODE, HIGH);   // set the LED on
  delay(1000);              // wait for a second
  digitalWrite(LED_PMODE, LOW);    // set the LED off
  delay(1000);              // wait for a second

I set the LED_PIN in TinyISP_SelectBuildOptions.h to 11 because that is the on-board LED on the Teensy2 is 11. I also set the TICK_TOCK_PIN to 8 'cos I already had an LED on that. Neither of those light up. Doesn't actually matter to me though.

Go Up