Comments (13)
It would be great to have it running on a cheap /small chip. people over ttnforums have it running already... https://www.thethingsnetwork.org/forum/t/attiny85-rfm95-temperature-sensor/11211
and here: https://www.thethingsnetwork.org/labs/story/tinylora-atmospheric-sensor
and this library: https://github.com/ClemensRiederer/TinyLoRa-BME280_v1.1
but without using DIO pins.
the above output is for the lorasender arduino sketch:
#include <tinySPI.h>
#include <LoRa.h>
#define HARDWARE_SPI 1
int counter = 0;
void setup() {
Serial.begin(115200);
while (!Serial);
Serial.println("LoRa Sender");
SPI.begin(); // start hardware SPI (the library sets up the clock and data pins)
// override the default CS, reset, and IRQ pins (optional)
LoRa.setPins(4, 0, 3); // set CS, reset, IRQ pin
/* if (!LoRa.begin(866E6)) {
Serial.println("Starting LoRa failed!");
while (1);
}
*/
if (!LoRa.begin(433E6)) {
Serial.println("Starting LoRa failed!");
while (1);
}
}
void loop() {
Serial.print("Sending packet: ");
Serial.println(counter);
// send packet
LoRa.beginPacket();
LoRa.print("hello ");
LoRa.print(counter);
LoRa.endPacket();
counter++;
delay(5000);
}
from arduino-lora.
@Sn0ff it should work, I haven't tested myself though. Please try it out and let us know.
from arduino-lora.
Hello, i am trying to get this library to run over attiny85. but i've no clue about so many errors. perhaps some help could solve the problems:
C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\XYZ\AppData\Local\Arduino15\packages -hardware C:\Users\XYZ\Documents\Arduino\hardware -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\XYZ\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\XYZ\Documents\Arduino\libraries -fqbn=digistump:avr:digispark-tiny -ide-version=10805 -build-path C:\Users\XYZ\AppData\Local\Temp\arduino_build_484936 -warnings=none -build-cache C:\Users\XYZ\AppData\Local\Temp\arduino_cache_914940 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=C:\Users\XYZ\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.8.1-arduino5 -prefs=runtime.tools.micronucleus.path=C:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\tools\micronucleus\2.0a4 -verbose C:\Users\XYZ\Documents\Arduino\LoRaSender\LoRaSender.ino
C:\Program Files (x86)\Arduino\arduino-builder -compile -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\XYZ\AppData\Local\Arduino15\packages -hardware C:\Users\XYZ\Documents\Arduino\hardware -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\XYZ\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\XYZ\Documents\Arduino\libraries -fqbn=digistump:avr:digispark-tiny -ide-version=10805 -build-path C:\Users\XYZ\AppData\Local\Temp\arduino_build_484936 -warnings=none -build-cache C:\Users\XYZ\AppData\Local\Temp\arduino_cache_914940 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=C:\Users\XYZ\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.8.1-arduino5 -prefs=runtime.tools.micronucleus.path=C:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\tools\micronucleus\2.0a4 -verbose C:\Users\XYZ\Documents\Arduino\LoRaSender\LoRaSender.ino
Using board 'digispark-tiny' from platform in folder: C:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7
Using core 'tiny' from platform in folder: C:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7
Detecting libraries used...
"C:\Users\XYZ\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.8.1-arduino5/bin/avr-g++" -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -w -x c++ -E -CC -mmcu=attiny85 -DF_CPU=16500000L -DARDUINO=10805 -DARDUINO_AVR_DIGISPARK -DARDUINO_ARCH_AVR "-IC:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\cores\tiny" "-IC:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\variants\digispark" "C:\Users\XYZ\AppData\Local\Temp\arduino_build_484936\sketch\LoRaSender.ino.cpp" -o "nul"
"C:\Users\XYZ\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.8.1-arduino5/bin/avr-g++" -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -w -x c++ -E -CC -mmcu=attiny85 -DF_CPU=16500000L -DARDUINO=10805 -DARDUINO_AVR_DIGISPARK -DARDUINO_ARCH_AVR "-IC:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\cores\tiny" "-IC:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\variants\digispark" "-IC:\Users\XYZ\Documents\Arduino\libraries\arduino_215513\src" "C:\Users\XYZ\AppData\Local\Temp\arduino_build_484936\sketch\LoRaSender.ino.cpp" -o "nul"
"C:\Users\XYZ\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.8.1-arduino5/bin/avr-g++" -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -w -x c++ -E -CC -mmcu=attiny85 -DF_CPU=16500000L -DARDUINO=10805 -DARDUINO_AVR_DIGISPARK -DARDUINO_ARCH_AVR "-IC:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\cores\tiny" "-IC:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\variants\digispark" "-IC:\Users\XYZ\Documents\Arduino\libraries\arduino_215513\src" "-IC:\Users\XYZ\Documents\Arduino\libraries\arduino_912086\src" "C:\Users\XYZ\AppData\Local\Temp\arduino_build_484936\sketch\LoRaSender.ino.cpp" -o "nul"
"C:\Users\XYZ\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.8.1-arduino5/bin/avr-g++" -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -w -x c++ -E -CC -mmcu=attiny85 -DF_CPU=16500000L -DARDUINO=10805 -DARDUINO_AVR_DIGISPARK -DARDUINO_ARCH_AVR "-IC:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\cores\tiny" "-IC:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\variants\digispark" "-IC:\Users\XYZ\Documents\Arduino\libraries\arduino_215513\src" "-IC:\Users\XYZ\Documents\Arduino\libraries\arduino_912086\src" "-IC:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\SPI" "C:\Users\XYZ\AppData\Local\Temp\arduino_build_484936\sketch\LoRaSender.ino.cpp" -o "nul"
"C:\Users\XYZ\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.8.1-arduino5/bin/avr-g++" -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -w -x c++ -E -CC -mmcu=attiny85 -DF_CPU=16500000L -DARDUINO=10805 -DARDUINO_AVR_DIGISPARK -DARDUINO_ARCH_AVR "-IC:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\cores\tiny" "-IC:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\variants\digispark" "-IC:\Users\XYZ\Documents\Arduino\libraries\arduino_215513\src" "-IC:\Users\XYZ\Documents\Arduino\libraries\arduino_912086\src" "-IC:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\SPI" "C:\Users\XYZ\Documents\Arduino\libraries\arduino_215513\src\tinySPI.cpp" -o "nul"
"C:\Users\XYZ\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.8.1-arduino5/bin/avr-g++" -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -w -x c++ -E -CC -mmcu=attiny85 -DF_CPU=16500000L -DARDUINO=10805 -DARDUINO_AVR_DIGISPARK -DARDUINO_ARCH_AVR "-IC:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\cores\tiny" "-IC:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\variants\digispark" "-IC:\Users\XYZ\Documents\Arduino\libraries\arduino_215513\src" "-IC:\Users\XYZ\Documents\Arduino\libraries\arduino_912086\src" "-IC:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\SPI" "C:\Users\XYZ\Documents\Arduino\libraries\arduino_912086\src\LoRa.cpp" -o "nul"
"C:\Users\XYZ\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.8.1-arduino5/bin/avr-g++" -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -w -x c++ -E -CC -mmcu=attiny85 -DF_CPU=16500000L -DARDUINO=10805 -DARDUINO_AVR_DIGISPARK -DARDUINO_ARCH_AVR "-IC:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\cores\tiny" "-IC:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\variants\digispark" "-IC:\Users\XYZ\Documents\Arduino\libraries\arduino_215513\src" "-IC:\Users\XYZ\Documents\Arduino\libraries\arduino_912086\src" "-IC:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\SPI" "C:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\SPI\SPI.cpp" -o "nul"
Generating function prototypes...
"C:\Users\XYZ\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.8.1-arduino5/bin/avr-g++" -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -w -x c++ -E -CC -mmcu=attiny85 -DF_CPU=16500000L -DARDUINO=10805 -DARDUINO_AVR_DIGISPARK -DARDUINO_ARCH_AVR "-IC:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\cores\tiny" "-IC:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\variants\digispark" "-IC:\Users\XYZ\Documents\Arduino\libraries\arduino_215513\src" "-IC:\Users\XYZ\Documents\Arduino\libraries\arduino_912086\src" "-IC:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\SPI" "C:\Users\XYZ\AppData\Local\Temp\arduino_build_484936\sketch\LoRaSender.ino.cpp" -o "C:\Users\XYZ\AppData\Local\Temp\arduino_build_484936\preproc\ctags_target_for_gcc_minus_e.cpp"
"C:\Program Files (x86)\Arduino\tools-builder\ctags\5.8-arduino11/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\Users\XYZ\AppData\Local\Temp\arduino_build_484936\preproc\ctags_target_for_gcc_minus_e.cpp"
Compiling sketch...
"C:\Users\XYZ\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.8.1-arduino5/bin/avr-g++" -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -MMD -mmcu=attiny85 -DF_CPU=16500000L -DARDUINO=10805 -DARDUINO_AVR_DIGISPARK -DARDUINO_ARCH_AVR "-IC:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\cores\tiny" "-IC:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\variants\digispark" "-IC:\Users\XYZ\Documents\Arduino\libraries\arduino_215513\src" "-IC:\Users\XYZ\Documents\Arduino\libraries\arduino_912086\src" "-IC:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\SPI" "C:\Users\XYZ\AppData\Local\Temp\arduino_build_484936\sketch\LoRaSender.ino.cpp" -o "C:\Users\XYZ\AppData\Local\Temp\arduino_build_484936\sketch\LoRaSender.ino.cpp.o"
In file included from c:\users\xyz\appdata\local\arduino15\packages\arduino\tools\avr-gcc\4.8.1-arduino5\avr\include\avr\io.h:99:0,
from c:\users\xyz\appdata\local\arduino15\packages\arduino\tools\avr-gcc\4.8.1-arduino5\avr\include\avr\interrupt.h:38,
from C:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\cores\tiny/WProgram.h:8,
from C:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\cores\tiny/Arduino.h:4,
from C:\Users\XYZ\AppData\Local\Temp\arduino_build_484936\sketch\LoRaSender.ino.cpp:1:
C:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\SPI/SPI.h: In member function 'void SPISettings::init_AlwaysInline(uint32_t, uint8_t, uint8_t)':
C:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\SPI/SPI.h:146:16: error: 'SPE' was not declared in this scope
spcr = _BV(SPE) | _BV(MSTR) | ((bitOrder == LSBFIRST) ? _BV(DORD) : 0) |
^
C:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\SPI/SPI.h:146:27: error: 'MSTR' was not declared in this scope
spcr = _BV(SPE) | _BV(MSTR) | ((bitOrder == LSBFIRST) ? _BV(DORD) : 0) |
^
C:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\SPI/SPI.h:146:65: error: 'DORD' was not declared in this scope
spcr = _BV(SPE) | _BV(MSTR) | ((bitOrder == LSBFIRST) ? _BV(DORD) : 0) |
^
In file included from C:\Users\XYZ\Documents\Arduino\libraries\arduino_912086\src/LoRa.h:5:0,
from C:\Users\XYZ\Documents\Arduino\LoRaSender\LoRaSender.ino:2:
C:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\SPI/SPI.h: In static member function 'static void SPIClass::beginTransaction(SPISettings)':
C:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\SPI/SPI.h:203:5: error: 'SPCR' was not declared in this scope
SPCR = settings.spcr;
^
C:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\SPI/SPI.h:204:5: error: 'SPSR' was not declared in this scope
SPSR = settings.spsr;
^
C:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\SPI/SPI.h: In static member function 'static uint8_t SPIClass::transfer(uint8_t)':
C:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\SPI/SPI.h:209:5: error: 'SPDR' was not declared in this scope
SPDR = data;
^
C:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\SPI/SPI.h:217:14: error: 'SPSR' was not declared in this scope
while (!(SPSR & _BV(SPIF))) ; // wait
^
In file included from c:\users\xyz\appdata\local\arduino15\packages\arduino\tools\avr-gcc\4.8.1-arduino5\avr\include\avr\io.h:99:0,
from c:\users\xyz\appdata\local\arduino15\packages\arduino\tools\avr-gcc\4.8.1-arduino5\avr\include\avr\interrupt.h:38,
from C:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\cores\tiny/WProgram.h:8,
from C:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\cores\tiny/Arduino.h:4,
from C:\Users\XYZ\AppData\Local\Temp\arduino_build_484936\sketch\LoRaSender.ino.cpp:1:
C:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\SPI/SPI.h:217:25: error: 'SPIF' was not declared in this scope
while (!(SPSR & _BV(SPIF))) ; // wait
^
In file included from C:\Users\XYZ\Documents\Arduino\libraries\arduino_912086\src/LoRa.h:5:0,
from C:\Users\XYZ\Documents\Arduino\LoRaSender\LoRaSender.ino:2:
C:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\SPI/SPI.h: In static member function 'static uint16_t SPIClass::transfer16(uint16_t)':
C:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\SPI/SPI.h:223:11: error: 'SPCR' was not declared in this scope
if (!(SPCR & _BV(DORD))) {
^
In file included from c:\users\xyz\appdata\local\arduino15\packages\arduino\tools\avr-gcc\4.8.1-arduino5\avr\include\avr\io.h:99:0,
from c:\users\xyz\appdata\local\arduino15\packages\arduino\tools\avr-gcc\4.8.1-arduino5\avr\include\avr\interrupt.h:38,
from C:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\cores\tiny/WProgram.h:8,
from C:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\cores\tiny/Arduino.h:4,
from C:\Users\XYZ\AppData\Local\Temp\arduino_build_484936\sketch\LoRaSender.ino.cpp:1:
C:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\SPI/SPI.h:223:22: error: 'DORD' was not declared in this scope
if (!(SPCR & _BV(DORD))) {
^
In file included from C:\Users\XYZ\Documents\Arduino\libraries\arduino_912086\src/LoRa.h:5:0,
from C:\Users\XYZ\Documents\Arduino\LoRaSender\LoRaSender.ino:2:
C:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\SPI/SPI.h:224:7: error: 'SPDR' was not declared in this scope
SPDR = in.msb;
^
C:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\SPI/SPI.h:226:16: error: 'SPSR' was not declared in this scope
while (!(SPSR & _BV(SPIF))) ;
^
In file included from c:\users\xyz\appdata\local\arduino15\packages\arduino\tools\avr-gcc\4.8.1-arduino5\avr\include\avr\io.h:99:0,
from c:\users\xyz\appdata\local\arduino15\packages\arduino\tools\avr-gcc\4.8.1-arduino5\avr\include\avr\interrupt.h:38,
from C:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\cores\tiny/WProgram.h:8,
from C:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\cores\tiny/Arduino.h:4,
from C:\Users\XYZ\AppData\Local\Temp\arduino_build_484936\sketch\LoRaSender.ino.cpp:1:
C:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\SPI/SPI.h:226:27: error: 'SPIF' was not declared in this scope
while (!(SPSR & _BV(SPIF))) ;
^
In file included from C:\Users\XYZ\Documents\Arduino\libraries\arduino_912086\src/LoRa.h:5:0,
from C:\Users\XYZ\Documents\Arduino\LoRaSender\LoRaSender.ino:2:
C:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\SPI/SPI.h:230:16: error: 'SPSR' was not declared in this scope
while (!(SPSR & _BV(SPIF))) ;
^
In file included from c:\users\xyz\appdata\local\arduino15\packages\arduino\tools\avr-gcc\4.8.1-arduino5\avr\include\avr\io.h:99:0,
from c:\users\xyz\appdata\local\arduino15\packages\arduino\tools\avr-gcc\4.8.1-arduino5\avr\include\avr\interrupt.h:38,
from C:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\cores\tiny/WProgram.h:8,
from C:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\cores\tiny/Arduino.h:4,
from C:\Users\XYZ\AppData\Local\Temp\arduino_build_484936\sketch\LoRaSender.ino.cpp:1:
C:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\SPI/SPI.h:230:27: error: 'SPIF' was not declared in this scope
while (!(SPSR & _BV(SPIF))) ;
^
In file included from C:\Users\XYZ\Documents\Arduino\libraries\arduino_912086\src/LoRa.h:5:0,
from C:\Users\XYZ\Documents\Arduino\LoRaSender\LoRaSender.ino:2:
C:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\SPI/SPI.h:233:7: error: 'SPDR' was not declared in this scope
SPDR = in.lsb;
^
C:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\SPI/SPI.h:235:16: error: 'SPSR' was not declared in this scope
while (!(SPSR & _BV(SPIF))) ;
^
In file included from c:\users\xyz\appdata\local\arduino15\packages\arduino\tools\avr-gcc\4.8.1-arduino5\avr\include\avr\io.h:99:0,
from c:\users\xyz\appdata\local\arduino15\packages\arduino\tools\avr-gcc\4.8.1-arduino5\avr\include\avr\interrupt.h:38,
from C:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\cores\tiny/WProgram.h:8,
from C:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\cores\tiny/Arduino.h:4,
from C:\Users\XYZ\AppData\Local\Temp\arduino_build_484936\sketch\LoRaSender.ino.cpp:1:
C:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\SPI/SPI.h:235:27: error: 'SPIF' was not declared in this scope
while (!(SPSR & _BV(SPIF))) ;
^
In file included from C:\Users\XYZ\Documents\Arduino\libraries\arduino_912086\src/LoRa.h:5:0,
from C:\Users\XYZ\Documents\Arduino\LoRaSender\LoRaSender.ino:2:
C:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\SPI/SPI.h:239:16: error: 'SPSR' was not declared in this scope
while (!(SPSR & _BV(SPIF))) ;
^
In file included from c:\users\xyz\appdata\local\arduino15\packages\arduino\tools\avr-gcc\4.8.1-arduino5\avr\include\avr\io.h:99:0,
from c:\users\xyz\appdata\local\arduino15\packages\arduino\tools\avr-gcc\4.8.1-arduino5\avr\include\avr\interrupt.h:38,
from C:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\cores\tiny/WProgram.h:8,
from C:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\cores\tiny/Arduino.h:4,
from C:\Users\XYZ\AppData\Local\Temp\arduino_build_484936\sketch\LoRaSender.ino.cpp:1:
C:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\SPI/SPI.h:239:27: error: 'SPIF' was not declared in this scope
while (!(SPSR & _BV(SPIF))) ;
^
In file included from C:\Users\XYZ\Documents\Arduino\libraries\arduino_912086\src/LoRa.h:5:0,
from C:\Users\XYZ\Documents\Arduino\LoRaSender\LoRaSender.ino:2:
C:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\SPI/SPI.h: In static member function 'static void SPIClass::transfer(void*, size_t)':
C:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\SPI/SPI.h:247:5: error: 'SPDR' was not declared in this scope
SPDR = *p;
^
C:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\SPI/SPI.h:250:16: error: 'SPSR' was not declared in this scope
while (!(SPSR & _BV(SPIF))) ;
^
In file included from c:\users\xyz\appdata\local\arduino15\packages\arduino\tools\avr-gcc\4.8.1-arduino5\avr\include\avr\io.h:99:0,
from c:\users\xyz\appdata\local\arduino15\packages\arduino\tools\avr-gcc\4.8.1-arduino5\avr\include\avr\interrupt.h:38,
from C:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\cores\tiny/WProgram.h:8,
from C:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\cores\tiny/Arduino.h:4,
from C:\Users\XYZ\AppData\Local\Temp\arduino_build_484936\sketch\LoRaSender.ino.cpp:1:
C:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\SPI/SPI.h:250:27: error: 'SPIF' was not declared in this scope
while (!(SPSR & _BV(SPIF))) ;
^
In file included from C:\Users\XYZ\Documents\Arduino\libraries\arduino_912086\src/LoRa.h:5:0,
from C:\Users\XYZ\Documents\Arduino\LoRaSender\LoRaSender.ino:2:
C:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\SPI/SPI.h:255:14: error: 'SPSR' was not declared in this scope
while (!(SPSR & _BV(SPIF))) ;
^
In file included from c:\users\xyz\appdata\local\arduino15\packages\arduino\tools\avr-gcc\4.8.1-arduino5\avr\include\avr\io.h:99:0,
from c:\users\xyz\appdata\local\arduino15\packages\arduino\tools\avr-gcc\4.8.1-arduino5\avr\include\avr\interrupt.h:38,
from C:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\cores\tiny/WProgram.h:8,
from C:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\cores\tiny/Arduino.h:4,
from C:\Users\XYZ\AppData\Local\Temp\arduino_build_484936\sketch\LoRaSender.ino.cpp:1:
C:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\SPI/SPI.h:255:25: error: 'SPIF' was not declared in this scope
while (!(SPSR & _BV(SPIF))) ;
^
In file included from C:\Users\XYZ\Documents\Arduino\libraries\arduino_912086\src/LoRa.h:5:0,
from C:\Users\XYZ\Documents\Arduino\LoRaSender\LoRaSender.ino:2:
C:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\SPI/SPI.h: In static member function 'static void SPIClass::setBitOrder(uint8_t)':
C:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\SPI/SPI.h:292:31: error: 'SPCR' was not declared in this scope
if (bitOrder == LSBFIRST) SPCR |= _BV(DORD);
^
In file included from c:\users\xyz\appdata\local\arduino15\packages\arduino\tools\avr-gcc\4.8.1-arduino5\avr\include\avr\io.h:99:0,
from c:\users\xyz\appdata\local\arduino15\packages\arduino\tools\avr-gcc\4.8.1-arduino5\avr\include\avr\interrupt.h:38,
from C:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\cores\tiny/WProgram.h:8,
from C:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\cores\tiny/Arduino.h:4,
from C:\Users\XYZ\AppData\Local\Temp\arduino_build_484936\sketch\LoRaSender.ino.cpp:1:
C:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\SPI/SPI.h:292:43: error: 'DORD' was not declared in this scope
if (bitOrder == LSBFIRST) SPCR |= _BV(DORD);
^
In file included from C:\Users\XYZ\Documents\Arduino\libraries\arduino_912086\src/LoRa.h:5:0,
from C:\Users\XYZ\Documents\Arduino\LoRaSender\LoRaSender.ino:2:
C:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\SPI/SPI.h:293:10: error: 'SPCR' was not declared in this scope
else SPCR &= ~(_BV(DORD));
^
In file included from c:\users\xyz\appdata\local\arduino15\packages\arduino\tools\avr-gcc\4.8.1-arduino5\avr\include\avr\io.h:99:0,
from c:\users\xyz\appdata\local\arduino15\packages\arduino\tools\avr-gcc\4.8.1-arduino5\avr\include\avr\interrupt.h:38,
from C:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\cores\tiny/WProgram.h:8,
from C:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\cores\tiny/Arduino.h:4,
from C:\Users\XYZ\AppData\Local\Temp\arduino_build_484936\sketch\LoRaSender.ino.cpp:1:
C:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\SPI/SPI.h:293:24: error: 'DORD' was not declared in this scope
else SPCR &= ~(_BV(DORD));
^
In file included from C:\Users\XYZ\Documents\Arduino\libraries\arduino_912086\src/LoRa.h:5:0,
from C:\Users\XYZ\Documents\Arduino\LoRaSender\LoRaSender.ino:2:
C:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\SPI/SPI.h: In static member function 'static void SPIClass::setDataMode(uint8_t)':
C:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\SPI/SPI.h:298:5: error: 'SPCR' was not declared in this scope
SPCR = (SPCR & ~SPI_MODE_MASK) | dataMode;
^
C:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\SPI/SPI.h: In static member function 'static void SPIClass::setClockDivider(uint8_t)':
C:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\SPI/SPI.h:303:5: error: 'SPCR' was not declared in this scope
SPCR = (SPCR & ~SPI_CLOCK_MASK) | (clockDiv & SPI_CLOCK_MASK);
^
C:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\SPI/SPI.h:304:5: error: 'SPSR' was not declared in this scope
SPSR = (SPSR & ~SPI_2XCLOCK_MASK) | ((clockDiv >> 2) & SPI_2XCLOCK_MASK);
^
C:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\SPI/SPI.h: In static member function 'static void SPIClass::attachInterrupt()':
C:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\SPI/SPI.h:309:42: error: 'SPCR' was not declared in this scope
inline static void attachInterrupt() { SPCR |= _BV(SPIE); }
^
In file included from c:\users\xyz\appdata\local\arduino15\packages\arduino\tools\avr-gcc\4.8.1-arduino5\avr\include\avr\io.h:99:0,
from c:\users\xyz\appdata\local\arduino15\packages\arduino\tools\avr-gcc\4.8.1-arduino5\avr\include\avr\interrupt.h:38,
from C:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\cores\tiny/WProgram.h:8,
from C:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\cores\tiny/Arduino.h:4,
from C:\Users\XYZ\AppData\Local\Temp\arduino_build_484936\sketch\LoRaSender.ino.cpp:1:
C:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\SPI/SPI.h:309:54: error: 'SPIE' was not declared in this scope
inline static void attachInterrupt() { SPCR |= _BV(SPIE); }
^
In file included from C:\Users\XYZ\Documents\Arduino\libraries\arduino_912086\src/LoRa.h:5:0,
from C:\Users\XYZ\Documents\Arduino\LoRaSender\LoRaSender.ino:2:
C:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\SPI/SPI.h: In static member function 'static void SPIClass::detachInterrupt()':
C:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\SPI/SPI.h:310:42: error: 'SPCR' was not declared in this scope
inline static void detachInterrupt() { SPCR &= ~_BV(SPIE); }
^
In file included from c:\users\xyz\appdata\local\arduino15\packages\arduino\tools\avr-gcc\4.8.1-arduino5\avr\include\avr\io.h:99:0,
from c:\users\xyz\appdata\local\arduino15\packages\arduino\tools\avr-gcc\4.8.1-arduino5\avr\include\avr\interrupt.h:38,
from C:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\cores\tiny/WProgram.h:8,
from C:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\cores\tiny/Arduino.h:4,
from C:\Users\XYZ\AppData\Local\Temp\arduino_build_484936\sketch\LoRaSender.ino.cpp:1:
C:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\SPI/SPI.h:310:55: error: 'SPIE' was not declared in this scope
inline static void detachInterrupt() { SPCR &= ~_BV(SPIE); }
^
In file included from C:\Users\XYZ\Documents\Arduino\libraries\arduino_912086\src/LoRa.h:5:0,
from C:\Users\XYZ\Documents\Arduino\LoRaSender\LoRaSender.ino:2:
C:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\SPI/SPI.h: At global scope:
C:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\SPI/SPI.h:322:17: error: conflicting declaration 'SPIClass SPI'
extern SPIClass SPI;
^
In file included from C:\Users\XYZ\Documents\Arduino\LoRaSender\LoRaSender.ino:1:0:
C:\Users\XYZ\Documents\Arduino\libraries\arduino_215513\src/tinySPI.h:54:16: error: 'SPI' has a previous declaration as 'tinySPI SPI'
extern tinySPI SPI;
^
In file included from C:\Users\XYZ\Documents\Arduino\LoRaSender\LoRaSender.ino:2:0:
C:\Users\XYZ\Documents\Arduino\libraries\arduino_912086\src/LoRa.h:30:18: error: conflicting return type specified for 'virtual size_t LoRaClass::write(const uint8_t*, size_t)'
virtual size_t write(const uint8_t *buffer, size_t size);
^
In file included from C:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\cores\tiny/Stream.h:24:0,
from C:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\cores\tiny/TinyDebugSerial.h:31,
from C:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\cores\tiny/WProgram.h:18,
from C:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\cores\tiny/Arduino.h:4,
from C:\Users\XYZ\AppData\Local\Temp\arduino_build_484936\sketch\LoRaSender.ino.cpp:1:
C:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\cores\tiny/Print.h:75:18: error: overriding 'virtual void Print::write(const uint8_t*, size_t)'
virtual void write(const uint8_t *buffer, size_t size);
^
C:\Users\XYZ\Documents\Arduino\LoRaSender\LoRaSender.ino: In function 'void setup()':
LoRaSender:8: error: no match for 'operator!' (operand type is 'TinyDebugSerial')
while (!Serial);
^
C:\Users\XYZ\Documents\Arduino\LoRaSender\LoRaSender.ino:8:10: note: candidate is:
C:\Users\XYZ\Documents\Arduino\LoRaSender\LoRaSender.ino:8:10: note: operator!(bool)
C:\Users\XYZ\Documents\Arduino\LoRaSender\LoRaSender.ino:8:10: note: no known conversion for argument 1 from 'TinyDebugSerial' to 'bool'
Using library arduino_215513 at version 1.1.1 in folder: C:\Users\XYZ\Documents\Arduino\libraries\arduino_215513
Using library arduino_912086 at version 0.3.0 in folder: C:\Users\XYZ\Documents\Arduino\libraries\arduino_912086
Using library SPI at version 1.0 in folder: C:\Users\XYZ\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\SPI
exit status 1
no match for 'operator!' (operand type is 'TinyDebugSerial')
from arduino-lora.
iotlearner0level
Did you get the above sketch to work with the ATtiny?
3Dtj
from arduino-lora.
3Dtj To be honest, i gave up. instead i went for stm32/bluepill board which is cheap yet quite powerful and has lots of gpio pins and also spi/i2c/usb/can etc. I used the popular LMIC library (for LoRaWAN, TTN and not just sender/receiver). there were some problems initially, but they were sorted out after some help from the forums. i would recommend this to begin with: https://www.thethingsnetwork.org/labs/story/a-cheap-stm32-arduino-node
from arduino-lora.
Thanks! I'm reviewing the links that you posted for Clemens Riederer and I have to believe that if he got his project working then I should be able to get Sandeep's code to run off of the ATTiny. I'll check the stm32 suggestion too.
from arduino-lora.
3Dtj
Please keep us informed. however, i think the real power of lora is the loraWan "network" That makes it "internet" of things. for point-to-point connections, there are many cheaper alternatives. ATtiny85 has limited number of pins. so even if you get it running, i'm not sure if that will be useful for sending any practical data, if cheap is your goal. Some people suggested attiny84, apparentlly, not that popular in my country i can get bluepill cheaper.
if you want something which works on AT commands directly over serial, i think they are somewhat costlier. The things network sometimes behaves wierd, but i think if data reaches the network, then there are many "integrations" so it is easier to work. This is one advantage over point to point.
from arduino-lora.
from arduino-lora.
ok, point taken. i applied similar approach too ;-) With all that said, i would say that i'm still interested!
from arduino-lora.
from arduino-lora.
from arduino-lora.
thanks for sharing. i would try that in a month or so when i have some more time....i think it is a great news. hope to make something useful. Attiny85 is quite cheap and really tiny ;-)
from arduino-lora.
Hi,
I am trying to use the ATTINY85 with my sx1276 transceiver. I have already tried the simple receiver and sender code by Sandeep and it worked fine using two Arduino boards at both ends.
Now at the transmitting side I am using the ATTiny85-SX1276 setup, but the packet is not being received at the Nano-SX1276 setup. I have also tried swapping the MOSI and MISO pins as mentioned above but still no luck.
Any Help?
Thanks!
Update: It worked after I powered the Attiny with 3.3V instead of 5V.
from arduino-lora.
Related Issues (20)
- Duplex Communication that is compatible with sx1262 HOT 1
- lora packet buffer issue and crc algorithm HOT 1
- `Starting LoRa failed` using LoRa shield LA66 HOT 1
- Technology design project
- Starting LoRa with ESP32 fail HOT 1
- Lora RA-02 modules not receiving anything HOT 1
- Cannot get standard library to work with SPI1
- NEW LR1121 .. Support HOT 1
- SX1276 CAD
- Starting lora failed HOT 2
- LORA COMMUNICATION USING NANO HOT 35
- Support for MSPM0 Microcontroller HOT 2
- How to Specify a Specific Channel HOT 1
- Сompatibility with STM32F401 and optimization HOT 1
- Arduino Uno + RFM95W sending/receiving issue
- can a getTxPower() method be implemented?
- ESP32 hanging on LoRa.endPacket() HOT 1
- Private declarations that should be public in LoRa.h HOT 1
- Installation not working as described
- function setSpreadingFactor set sf error
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from arduino-lora.