hi
i do a script and try to see what channels are linked
about some readings, it seems that sen5 is link to grove d5d6 connector and sen2 to the scl sda connector
I read but dont understand how to have a precision reference voltage on one of the analog
inputs to calculate the offset.
The analog input hardware specification is:
Input voltage range: 0-1.2V, however, the analog-to-digital converter saturates at 400 mV
Resolution: 14 bits = 12 uV
Sampling frequency: 35 us
WARNING
Driving these inputs above 1.2V can permanently damage the module.
show q 0x183 // Read channels 0, 1, and 7
Accuracy: 5% uncalibrated
The accuracy of each analog sensor reading can be offset by up to 5% due to variations
from chip to chip. To improve accuracy, Microchip recommends using a precision reference voltage on one of the analog
inputs to calculate the offset.
The offset is the same for all analog inputs. For example:
• Drive precision 200 mV reference on analog input 4.
• Read analog input 4 and compute the offset.
If you read 210 mV you know that the offset is +10 mV. When you read input 5, subtract 10 mV from the result.
And another thing, i use dth11 grove sensor. this sensor use a 40 bytes data to give humidity and temperature. i use channel 5 by a http get request with a php script.
i receive the data by a GET /myscipt.php?DATA= XXXX00001111222233334444555566667777\n\n
Where XXXX is the GPIO data and 0000 through to 7777 are the values of the 8 analogue inputs expressed in hexadecimal.
this is the way dth11 data are done. the 7777 values arent too small to content the 40bytes of the dth 11 data i’m not a mathematic convesion man… ? in that case how can i tansmit the 40bytes of data
DATA=16 bits RH data+16 bits Temperature data+8 bits check-sum
Example: MCU has received 40 bits data from RHT03 as
0000 0010 1000 1100 0000 0001 0101 1111 1110 1110
16 bits RH data 16 bits T data check sum
Here we convert 16 bits RH data from binary system to decimal system,
0000 0010 1000 1100 → 652
Binary system Decimal system
RH=652/10=65.2%RH
Here we convert 16 bits T data from binary system to decimal system,
0000 0001 0101 1111 → 351
Binary system Decimal system
T=351/10=35.1℃
When highest bit of temperature is 1, it means the temperature is below 0 degree Celsius.
Example: 1000 0000 0110 0101, T= minus 10.1℃
16 bits T data
Sum=0000 0010+1000 1100+0000 0001+0101 1111=1110 1110
Check-sum=the last 8 bits of Sum=1110 1110
by my search,i found a link bases on python to read data from wifly and a get process
http://www.digitaldiy.io/index.php/arti … 7xatvl_tr-
thanks for response