I just got my B404X Som and tried some I/o. ReadAnalog works well.Is it correct that the B404X does not support OneWire? They provided a temperature module and humidity sensor but I don’t see anyway to communicate with it
Thanks
The B404X does support OneWire. Typically you use the DS18B20 library which uses the OneWire library, however this is only a temperature sensor.
If you have one of the sensor kits, it's probably the DHT-11 temperature and humidity sensor. The link has the library to use.
If you are using the DHT-11 or DHT-22 for more than just experimentation, you probably want to use the DHT22Gen3_RK on the B404X as it will be more reliable, but has additional pin requirements. The other library works, it just return an error, which you must discard and retry, more often.
Hi Rick
I've tried adding library OneWire to my project but get the following compile error
lib/OneWire/OneWire.h:136:7: 'HAL_Pin_Mode' was not declared in this scope
Thanks
Dan
It appears that the library is not currently compatible with Device OS 6.x. You can either target Device OS 5.9.0, or use the instructions for using a locally modified library and just change HAL_Pin_Mode
to pinMode
, which I think will allow it to compile.
Hey
That did the trick! It now compiles cleanly. My last question is where are the D0-D8 pins. I only see A0-A7 pins
Thanks
Dan
How are you using the B404X? In the M.2 eval board, M.2 breakout board, some other off-the-shelf board like Mikroe, or your own custom board? Or is it a Boron, BRN404X?
M.2 Eval Board
They're there, but the silkscreen may have the atlernate name in some cases. See the expansion header.
Hi Rick
Was able to get my temp probe working with my DS1820 interface! Having problems with communicating with the DHT11 sensor. I plugged it into the GND,3.3V,SDA,SCL socket and not getting any data back. Enclosed a jpg of my setup.
Thanks for all the help
I really appreciate it
The DHT-11 has to be plugged into the other connector because it doesn't use I2C. Because peripherals on the eval board use I2C, you can't use those pins for GPIO.