descript.txt 2.2 KB

12345678910111213141516171819202122232425262728293031323334
  1. Info: CO2 sensor mini
  2. Rate: 1 <- nRF24 data rate (0 - 250Kbps, 1 - 1Mbps, 2 - 2Mbps)
  3. Ch: 121 <- nRF24 channel (0..125)
  4. CRC: 2 <- nRF24 CRC size
  5. DPL: 0 <- nRF24 dynamic payload en/dis
  6. Address: C8C8CF <- nRF24 address (3..5 bytes)
  7. Resend: 3 <- resend attempts on error
  8. Delay_ms: 30 <- delay between cmd and resend
  9. Payload struct: 2,1,1 <- field sizes of send packet in bytes, received packet consists of 1 field with default size 1 byte (int8)
  10. EEPROM=0; RAM=1; PROGMEM=2; ID=3; RESET=4 <- Constants
  11. R default: ,EEPROM,0xC1 <- default for read
  12. W default: n,,0x81 <- default for write, 'n' - means field value position
  13. Write start: 0,0,0x8F <- if exist in the file - packet before write a batch
  14. R: ID*=,ID <- Read cmd, '*' - means string like device ID, result in bytes = { 0, 0, 3, 0xC1 }
  15. R: OSCCAL=0x51,RAM <- Read cmd, result in bytes = { 0x51, 0, 1, 0xC1 }
  16. R: OSCCAL_EMEM=0 <- Read cmd, result in bytes = { 0, 0, 0, 0xC1 }
  17. R: CO2=0x67,RAM,0xC2 <- Read cmd, result in bytes = { 0x67, 0, 1, 0xC2 }
  18. R: CO2 threshold*2=5,,0xC2 <- Read cmd, '*2' - means received field with 2 bytes size (int16), result in bytes = { 5, 0, 0, 0xC2 }
  19. W: CO2 threshold=,5,0x82 <- Write cmd, send pkt = { <from WBatch 1 byte>, <from WBatch 2 byte>, 5, 0x82 }
  20. R: FanLSB[10]=i:9 <- Read cmd, '[n]' - means array with 'n' elements, 'i:n' - means array index field that will be incemented after next cmd
  21. result in bytes = 1 pkt: { 9, 0, 0, 0xC1 }, 2 pkt: { 10, 0, 0, 0xC1 }, 3 pkt: { 10, 0, 0, 0xC1 },... total 10 packets
  22. W: FanLSB=,i:9 <- Write cmd, 'i' - index field. Send packets: { n & 0xFF, n >> 8, 9, 0x81 }, { n & 0xFF, n >> 8, 10, 0x81 },...
  23. W: RxAddr=,1
  24. W: Reset=,RESET,0xC1
  25. RBatch: Settings: ID;OSCCAL;RxAddr;Ch;nRF RETR;CO2 threshold;CO2 correct;FanLSB <- Read Batch, 8 packets will be sent and received
  26. WBatch: Default: RxAddr=0xCF;CO2 threshold=1000;Reset <- Write Batch, Send: { 0,0,0,0x8F }, { 0xCF, 0, 1, 0x81 }, { 0xE8, 0x03, 5, 0x82 }, { 0, 0, 4, 0x81 }
  27. WBatch: Fans: FanLSB={0xC2,0xC3,0} <- Write Batch, Send: { 0,0,0,0x8F }, { 0xC2, 0, 9, 0x81 }, { 0xC3, 0, 10, 0x81 }