Hello
I'm having a problem with compiling my programm.
This is the programm i want to compile:
#include <SPI85.h>
#include <Mirf.h>
#include <MirfHardwareSpi85Driver.h>
// This USI was defined in SPI85.cpp
// Not to be confused with SPI (MOSI/MISO) used by ICSP pins
// Refer to page 61 of attiny84 datahseet
//
//#define USI-DO 5
//#define USI-DI 4
//#define USCK 6
#define CE 7
#define CSN 3
// ATMEL ATTINY84 / ARDUINO
//
// +-\/-+
// VCC 1| |14 GND
// SerialTx (D 0) PB0 2| |13 AREF (D 10)
// (D 1) PB1 3| |12 PA1 (D 9)
// RESET PB3 4| |11 PA2 (D 8)
// PWM INT0 (D 2) PB2 5| |10 PA3 (D 7) CE
// SS/CSN (D 3) PA7 6| |9 PA4 (D 6) USCK
// USI-DI (D 4) PA6 7| |8 PA5 (D 5) USI-DO
// +----+
void setup() {
Mirf.cePin = CE;
Mirf.csnPin = CSN;
Mirf.spi = &MirfHardwareSpi85;
Mirf.init();
Mirf.setRADDR((byte*)"serv1");
Mirf.payload = sizeof(unsigned long) ;
Mirf.config();
}
void loop() {
byte data [Mirf.payload];
if (!Mirf.isSending() && Mirf.dataReady()) {
Mirf.getData(data);
Mirf.setTADDR((byte *) "clie1");
Mirf.send(data);
}
delay(1000);
} // End loop()
it keeps giving me this error-message, even after some changes that I found in the internet:
In file included from C:\Users\Alexia\Documents\Arduino\libraries\Mirf\MirfSpiDriver.cpp:1:0:
C:\Users\Alexia\Documents\Arduino\libraries\Mirf\MirfSpiDriver.h:6:11: error: 'uint8_t' does not name a type
virtual uint8_t transfer(uint8_t data);
^
C:\Users\Alexia\Documents\Arduino\libraries\Mirf\MirfSpiDriver.cpp:3:1: error: 'uint8_t' does not name a type
uint8_t MirfSpiDriver::transfer(uint8_t data){
^
exit status 1
Error compiling for board ATtiny84 @ 1 MHz (internal oscillator; BOD disabled).
I just can't see what is missing in my programm.
Anyone could help me please?
Thanks
techniclover
I can't either. But, I can see what is missing from your post. Links to the libraries that you are using, for instance.
it keeps giving me this error-message, even after some changes that I found in the internet:
What changes? Found where? The end result is that the code you are compiling no longer matches what I would find on the internet, were I inclined to search for a link you should have posted. Therefore, having found the code would have been worthless.
I just didn't inculde Arduino.h because in that all those are included.
But it still gives me a error-message:
C:\Users\Alexia\Documents\Arduino\libraries\Mirf/features.h:262:32: fatal error: bits/uClibc_config.h: No such file or directory
#include <bits/uClibc_config.h>
^
compilation terminated.
exit status 1
Error compiling for board ATtiny84 @ 1 MHz (internal oscillator; BOD disabled).
The problem is that I can't find a library named like that.
I can find some called uClibc_conif.h but they don't work when I include them in the header.
Link to that Library I had:www.scs.stanford.edu/histar/src/uinc/bits/uClibc_config.h
I do not see a file called features.h there, so there is no reason for the compiler to be complaining about that file.
Therefore, that is NOT where you got the crap you are trying to compile. When you get around to posting a DIRECT link to the library YOU downloaded, then maybe you can get some help.
When compiling your .ino file, the arduino IDE adds a bunch of standard includes, one of them containing the definition of uint8_t . This is not done when compiling .cpp files - you have to have the include directive explicitly.