Closed artursmet closed 3 years ago
Hi the module use SoC and Mediatek SDK and pin enumeration ( hidden for the user ) https://github.com/Wiz-IO/framework-quectel/blob/master/arduino/variants/bc66-te-b/variant_pins.c#L26 column 2
OpenCPU have Quectel enumeration PINNAME_xxxxxx https://github.com/Wiz-IO/framework-quectel/blob/master/opencpu/bc66/SDK15/include/ql_gpio.h#L44
Arduino port use Quectel OpenCPU API as default user access and applications
and some "hacks" for direct access to original Mediatek SDK, opportunities and SoC registers
so...
OpenCPU GPIO functions is too for Dallas and DHT sensor
as example ( this hal_xxx functions use Mediatek enumerations ) https://github.com/Wiz-IO/framework-quectel/blob/master/opencpu/bc66/SDK15/wizio/hal.c#L35
Thanks for explanation, that makes a low of sense now. Do you have any idea why my setup doesn't work? I have tried several combinations of DHT/DS sensors with various GPIO setups, but I didn't managed to get the example code working in my case.
Did I read this correctly, the 9 / 28 PIN numbers are correct, when I connect the sensor to GPIO1 port?
these examples are the result of this discussion https://forums.quectel.com/t/bc66-gpio-pins-and-dallas-semi-temperature-sensor/4464
and is tested with Olimex board before to share it
is this line https://github.com/Wiz-IO/framework-quectel/blob/master/arduino/variants/bc66-te-b/variant_pins.c#L36 the array line is Arduino enum
in this case the level convertor generate noise ?!?! https://forums.quectel.com/uploads/default/original/2X/d/d2326859ab1e6b3f8983f587fcf3764b80919dd4.jpeg (image is from Quectel Forum discussion)
So if I understood you correctly - the Olimex dev board has level converter, which is preventing the program to run properly and read the DS1820 sensor, right? Is there a way to disable the converter on the board? (I'm running the board in default mode, I didn't touch the 3.3V jumpers yet).
I re-wired my setup with new DS sensor and I got to the point where the program was able to read the sensor ID, but it stopped:
ID E2 1C 3F 80 5B E2 1A CC
Init Error( 2 )
Init Error( 1 )
ID 00 00 00 00 00 00 00 00
Init Error( 3 )
And now after reseting the module it keeps displaying the 00 ID
yep... i dont know why ( no answer from Olimex and Quectel )
try shortcut olimex output pin GPIO1/P26 to module phisical pin 26 ( is GPIO1 ) look hardware manual to eliminate level-convertor
or use Quectel Board - there is no level-convertors
I'll try, thanks for all the replies!
YW btw: sorry now I am at HomeOffice and can not make "some" experiments ( for help )
btw. one more question - I have found this photo - https://pbs.twimg.com/media/EZh7iu9WAAUjG9j?format=jpg&name=large
What did you made with the stock Olimex board to achieve it? Do you have some wiring schema?
Hi,
Are the pin mappings from variant_pins.c up to date?
I have the Olimex NB-IoT devkit Rev B and I have connected the DHT22 sensor's data pin to GPIO 1 (according to this schema - https://raw.githubusercontent.com/OLIMEX/NB-IoT/master/HARDWARE/NB-IoT-DevKit-pinout.png)
I've run the example code https://github.com/Wiz-IO/platformio-quectel-examples/blob/master/BC66_SDK/Arduino/BC66_A11_DS1820_DHT_GPIO/src/main.cpp and set it to the DHT mode.
Based on the variants_pins.c I've set:
However, the module is failing to get the data from sensor:
What could I do to get it working as expected? I have also tried running the example with DS1820 sensor and the resistor, but also it looks like the module can't find the sensor attached to the GPIO port, that's why I suspect some problem in the sample code.
Btw. Why do we need to have two port numbers (A_PIN and M_PIN)?
My wiring is pretty much the same as this:![image](https://user-images.githubusercontent.com/1754812/97973687-be65ba00-1dc6-11eb-8e8d-ebf63214fb8d.png)
But instead of arduino I have the NB-IoT devkit of course.
When I switch it to the DS1820 sensor (with resistor) I receive: