The Digispark > Digispark Libraries
Digispark and Radiohead on arduino 1.04
(1/1)
archigraphe:
Hello,
I'm using Digispark as transmitter in a datalogging system.
I use Radiohead RH_ASK 1.49 driver on arduino 1.04 .
It compile well with 8Mhz tiny and digispark
but no signal at the end....
the code I'm using:
// ask_transmitter.pde
// -*- mode: C++ -*-
// Simple example of how to use RadioHead to transmit messages
// with a simple ASK transmitter in a very simple way.
// Implements a simplex (one-way) transmitter with an TX-C1 module
#include <RH_ASK.h>
//#include <SPI.h> // Not actually used but needed to compile
RH_ASK driver(2000,4,3);; // 200bps, TX on D3 (pin 2), RX on D4 (pin 3)
void setup()
{
/*Serial.begin(9600); // Debugging only
if (!driver.init())
Serial.println("init failed");*/
pinMode(1, OUTPUT); //LED on Model B
digitalWrite(1, HIGH);
delay(1000);
digitalWrite(1, LOW);
delay(1000);
digitalWrite(1, HIGH);
delay(1000);
digitalWrite(1, LOW);
delay(1000);
digitalWrite(1, HIGH);
delay(1000);
digitalWrite(1, LOW);
delay(1000);
digitalWrite(1, HIGH);
delay(1000);
digitalWrite(1, LOW);
delay(1000);
//pinMode(3, OUTPUT); // transmission on Pin 3 (D2)
}
void loop()
{
const char *msg = "20";
digitalWrite(1, HIGH);
driver.send((uint8_t *)msg, strlen(msg));
driver.waitPacketSent();
delay(200);
digitalWrite(1, LOW);
delay(200);
}
archigraphe:
So,
I pass to IDE 1.6.5 and all is working well,
the digispark are good to go....
with the specs of the attiny board,
drivers (2000,4,3)
no SPI def...
and with digispark (16.5Mhz)....
arturoreynoso86:
Hello!
How did you managed to make it work?
Regards!
Navigation
[0] Message Index
Go to full version