I downloaded the last version of TinyISP and TinyDebugKnockBang. Using Arduino 1.6.7, I uploaded TinyISP on UNO with this build options:
#define PROGRAMMER_SPI_CLOCK SLOW
#define RELAY_KNOCK_BANG_ENABLED 1
#define RELAY_KNOCK_BANG_USE_ALTERNATE_PIN 1
#define RELAY_SERIAL_ENABLED 0
#define TUNING_SIGNAL_ENABLED 0
#define TICK_TOCK_ENABLED 0
and then uploaded a simple sketch on Attiny84 @ 8MHz:
#include <TinyDebugKnockBang.h>
int led = 10; // pin for LED
void setup( void )
{
pinMode(led, OUTPUT);
Debug.begin( 250000 );
}
void loop( void )
{
digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(led, LOW); // turn the LED off by making the voltage LOW
delay(1000);
Debug.println( "testing..." );
}
LED is blinking in my Attiny board. I set baud rate to 19200 on serial monitor. When I press “!”, I see the message “— Monitor starting —” but there’s no output from Attiny. What’s wrong?
#define RELAY_KNOCK_BANG_USE_ALTERNATE_PIN 1
Do you know which is the alternate pin?
No. I don't have any idea what alternate pin means or which pin it is.
What does searching the source code tell you?
What does putting that macro name into Google tell you?
I searched forum and found your answer here: Tiny Tuner 2 - nothing showing up on Serial Monitor except "Monitor starting" - Microcontrollers - Arduino Forum
"#define RELAY_KNOCK_BANG_USE_ALTERNATE_PIN 1" moves Knock Bang receive to Digital Pin 7 (instead of MISO). I suggest disabling that (you will have to re-upload TinyISP)...
So I modified _TinyISP_BuildOptions.h :
#ifndef _TinyISP_BuildOptions_h
#define _TinyISP_BuildOptions_h
#define PROGRAMMER_SPI_CLOCK SLOW
#define RELAY_KNOCK_BANG_ENABLED 1
#define RELAY_KNOCK_BANG_USE_ALTERNATE_PIN 0
#define RELAY_SERIAL_ENABLED 0
#define TUNING_SIGNAL_ENABLED 0
#define TICK_TOCK_ENABLED 0
I uploaded tinyISP and the script again and it works very well! Thanks a lot!!!
I have two suggestions. I'd be great if you could explain the options of _TinyISP_BuildOptions in a few lines in source code. Also "RELAY_KNOCK_BANG_USE_ALTERNATE_PIN" is set to 1 by default. It would be better be set to zero.
samakar:
I suggest disabling that (you will have to re-upload TinyISP)...
I suggest you create a pull request.
I have two suggestions. I'd be great if you could explain the options of _TinyISP_BuildOptions in a few lines in source code. Also "RELAY_KNOCK_BANG_USE_ALTERNATE_PIN" is set to 1 by default. It would be better be set to zero.
I have one suggestion: create a pull request.
I uploaded tinyISP and the script again and it works very well! Thanks a lot!!!
Excellent. You are welcome.