esptool.py -p /dev/ttyUSB0 -b 115200 erase_flash
sendLen = myIos[i].BuildSensorMessage(sendBuff, ROCRAIL);
mqttClient.publish("rocnet/sr", (const uint8_t *) sendBuff, sendLen);
<i>
</i>#define RN_GROUP_SENSOR 8
#define RN_SENSOR_REPORT 1
uint8_t RNIOClass::BuildSensorMessage(uint8_t *mess, uint16_t dest){
uint8_t nrBytes = RN.BuildHeader(mess, dest); //build the general header (same for all messages I send)
mess[nrBytes++] = RN_GROUP_SENSOR; //sensor group
mess[nrBytes++] = RN_SENSOR_REPORT; //code
uint8_t sendDataLen = 4;
mess[nrBytes++] = sendDataLen; //data length
mess[nrBytes++] = 0; //addrH - ¹) Address of the reporting loco ??
mess[nrBytes++] = 0; //addrL - ¹) Address of the reporting loco ??
mess[nrBytes++] = State; //status
mess[nrBytes++] = Addr; //== port number
return(nrBytes);
}
Arduino: 1.8.1 (Windows 7), Board: "Generic ESP8266 Module, 80 MHz, 40MHz, DIO, 115200, 512K (64K SPIFFS), ck, Disabled, None"
C:\Users\SeB\Documents\Arduino\RNMqttv4\RNMqttv4.ino: In function 'void loop()':
RNMqttv4:249: error: 'class RNIOClass' has no member named 'SendState'
myIos[i].SendState = true;
^
RNMqttv4:262: error: 'class RNIOClass' has no member named 'SendState'
if(myIos[i].SendState){ //
^
RNMqttv4:263: error: 'class RNIOClass' has no member named 'SendState'
myIos[i].SendState = false;
^
exit status 1
'class RNIOClass' has no member named 'SendState'
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
byte ioPins[] = {5,4,13,12,14}; //the ESP ports used
#define IOS_NR 5
ciudat, m-am jucat week-endul asta cu (pana la) 8 porturi (cu Launchpad-ul, e drept) si de la versiuneaam o problema cu inputul 3 (adica pinul 13, ca ordonanta, cu ghinion)
il seteaza ca input dar nu pastreaza setarea
n-am mai avut nici o problema de genul asta. Pana atunci pateam ceva similar cu ce patesti tu, numai ca atunci cand incercam sa configurez iesirile ca servo-uri.V0.53 - Changed the place for EEPROM indexes define.
- Fixed a bug (wrong index) in EEPROM write of the channel config data.
boolean bForceInit = true;
boolean bForceInit = false;
Modulul are o stare "implicita"(vezi si wiki-ul)- board ID = 11, toate porturile intrari cu pull-up. Numai ca initializarea asta e valabila pana la prima configurare din Rocrail, dupa care configuratia din Rocrail ramane chiar si la reprogramarea "normala"daca s-ar declara din cod atat ID-ul (cel putin cel initial), IP-ul si starea pinilor?
/*
* No/wrong data in EEPROM or eeprom write forcing
*/
if(bEeProgrammingNeeded || bForceInit){
bEeProgrammingNeeded = false;
if(bSerialOk){
Serial.println(F("Write the eeprom"));
}
//write the boards parameters in the eeprom
RN.Init(); //init the board with the default address (11)
/*
* No/wrong data in EEPROM or eeprom write forcing
*/
if(bEeProgrammingNeeded || bForceInit){
bEeProgrammingNeeded = false;
if(bSerialOk){
Serial.println(F("Write the eeprom"));
}
//write the boards parameters in the eeprom
RN.Init(subIpL); //init the board with the IP as the address
Asta am zis si eu la inceput, da' dupa ce-am mai vorbit am ramas cu senzatia ca tu de fapt n-ai MS2, ci o emulezi cu Raspi. Si daca Raspi tot merge...sebba a spus:si a mai fi avantajul ca fiind dcc le pot comanda si din Mobile Station 2
We use essential cookies to make this site work, and optional cookies to enhance your experience.