我想在20个传感器上使用arduino mega做一个typedef struct
(或类似的,如果我不能),但是我有一个错误,我不明白为什么。是从arduino编译还是从我的代码?你认为我必须把我的代码放在一个头文件中吗?在Arduino上的typedef结构:变量没有命名一个类型
typedef struct {
char nom[8];
int pin;
int onOff;
int pente;
int offset;
int maximun;
int minimum;
int constante1;
int constante2;
int hyst1;
int hyst2;
float moyenne;
float valeurs[];
int frequence;
} structSondes;
structSondes sondes[20];
structSondes test;
sondes[0].pin=1;
test.pin=1;
我对编译此错误:
error: ‘sondes’ does not name a type
error: ‘test’ does not name a type
错误,它显示'sonde'或'sondes'?此外,'float valeurs [];'必须结束(按照'C99')。 – 2015-02-06 13:31:51
@SouravGhosh对不起,这是“探空仪” – sebastien 2015-02-06 13:37:53