Wiz-IO / platformio-quectel-examples

Examples for PlatformIO Quectel
29 stars 21 forks source link

kindly give some gpio and adc examples for arduino platform for BG96 #15

Closed Dineshkumar-code closed 3 years ago

Dineshkumar-code commented 3 years ago

kindly give some gpio and adc examples of arduino platform for BG96

Wiz-IO commented 3 years ago

gpio is as arduino adc - open read... look code wiringAnalog

Wiz-IO commented 3 years ago

pinMode(1, OUTPUT) digitalWrite(1, 1/0 )

pin table: https://github.com/Wiz-IO/framework-quectel/blob/cde22553e012cafd72b22c7c593bf0ef99307c11/arduino/variants/bg96/variant_pins.c#L8

analogOpen(0); val = analogRead(0);

pin table: https://github.com/Wiz-IO/framework-quectel/blob/master/arduino/cores/bg96/wiring_analog.c#L32

Dineshkumar-code commented 3 years ago

while using analogOpen(0); val = analogRead(0);

like that above I am getting restart problem on bg96 dev module is any solution for that

Wiz-IO commented 3 years ago

no idea ... debug code or ask Quectel support - the Arduino use QuecOpen API

Dineshkumar-code commented 3 years ago

it's reset and goes on void setup over some period, driver get disable and enable occur.. any solution for that

Wiz-IO commented 3 years ago

firmware BG96MAR02A09M1G_01.011.01.011 ( recommended )

Dineshkumar-code commented 3 years ago

Where to get the firmware version

Wiz-IO commented 3 years ago

https://www.quectel.com/contact/

Dineshkumar-code commented 3 years ago

https://www.quectel.com/contact/

They is no response from Quectel, Is possible to get firmware version from you...

Wiz-IO commented 3 years ago

https://forums.quectel.com/ I am not authorized to share Quectel tools

Dineshkumar-code commented 3 years ago

ok Sir

Wiz-IO commented 3 years ago

or contact with your local Quectel support

Dineshkumar-code commented 3 years ago

I got same firmware version but GPIO's are not controllable as mentioned GPIO mapping, adc reading same restart issue occur.

Wiz-IO commented 3 years ago

debug code or use QuecOpen API ( ThreadX API )

Dineshkumar-code commented 3 years ago

debug code or use QuecOpen API ( ThreadX API )

include

include

include

define pin_num 1

void setup() { Serial1.begin(115200); Serial1.println("inside Initialization"); pinMode(pin_num,INPUT); analogOpen(pin_num); // put your setup code here, to run once: }

void loop() {

int val = analogRead(1); Serial1.println("val : "); Serial1.println(val);

//delay(1000); // Serial1.println(val); // put your main code here, to run repeatedly: }

then the module get restarting on bg96

Wiz-IO commented 3 years ago

loop() must end with delay(1) as yield... it is RTOS

Dineshkumar-code commented 3 years ago

okay

Dineshkumar-code commented 3 years ago

i dont have SDK325 is a problem to use threadx method without that..

Wiz-IO commented 3 years ago

BG96MAR02... is SDK2 Arduino here support only SDK2

SDK3 & 4 have MMU enabled

Dineshkumar-code commented 3 years ago

can I get any docs or videos for controlling gpio using threadx method for BG96

Wiz-IO commented 3 years ago

ask from your local Quectel support QuecOpen/ThreadX SDK ... there is examples and documentation