AS726X with redboard PLUS

Hi,

I was previously using AS726X with redboard and qwiic shield and now I want to use it with Redboard PLUS.

I uploaded my code that works perfectly fine with redboard on my new redboard plus but it is not working. Compilation is ok but i don’t read any values. Is there something different with the readboard Plus.?

Can you help me with this?

Best, Richard

The code and whatnot will all be the same, but the Plus version uses CH340 drivers instead of FTDI; try installing them https://learn.sparkfun.com/tutorials/ho … 70QAvD_BwE and ensuring the right COM port is selected and see how that goes

I tried this but it doesn’t make any difference. I’m able to successfully upload the code to the board but it doesn’t works anyway.

I tried with the AS726X connected on the qwiic shield and also on the new qwiic connector on the board.

Does an I2C scanner detect the AS726x ? you should see some output

else does the blink sketch work? if so include Serial.begin() and a Serial.print() statement, At least you know you can see the print-out.

Do you get an error message when running the code ? Does begin() return without error (means it could read the sensor HW version)

Does getTemperature() return a value?

Looking at the schematics, the only difference I see in the level convertor from 5V to 3v3 the Redboar Plus is using 2.2K pull-up whereas the shield is using 4k7. The AS726X has 4k7 on the board as well. Maybe try to cut the JP1 if the board is not detected, responding as you expect.

Thank you for your help.

So actually I found out with the example provided by sparkfun that the sensor is working with the redboard plus. My problem seems to be the communication with the Nextion HMI where I display the values. It is connected with I2C. Any ideas?

Have you tried any example code made for your display?

Not yet but I will try it and keep you informed.

Hi,

So I tried the basic example from the easy nextion library but this doesn’t work :frowning:

#include “EasyNextionLibrary.h” // Include EasyNextionLibrary

EasyNex myNex(Serial); // Create an object of EasyNex class with the name < myNex >

// Set as parameter the Hardware Serial you are going to use

void setup(){

myNex.begin(9600); // Begin the object with a baud rate of 9600

// If no parameter was given in the begin(), the default baud rate of 9600 will be used

pinMode(LED_BUILTIN, OUTPUT); // The built-in LED is initialized as an output

}

void loop(){

myNex.NextionListen(); // This function must be called repeatedly to response touch events

// from Nextion touch panel. Actually, you should place it in your loop function.

}

void trigger0(){

/* Create a button on Nextion

  • Write in the Touch Release Event of the button

  • this command: printh 23 02 54 00

  • Every time the button is pressed, the trigger0() function will run

  • and the code inside will be executed once

*/

digitalWrite(LED_BUILTIN, !digitalRead(LED_BUILTIN)); //If LED_BUILTIN is ON, turn it OFF, or the opposite

if(digitalRead(LED_BUILTIN) == HIGH){

myNex.writeNum(“b0.bco”, 2016); // Set button b0 background color to GREEN (color code: 2016)

myNex.writeStr(“b0.txt”, “ON”); // Set button b0 text to “ON”

}else if(digitalRead(LED_BUILTIN) == LOW){

myNex.writeNum(“b0.bco”, 63488); // Set button b0 background color to RED (color code: 63488)

myNex.writeStr(“b0.txt”, “OFF”); // Set button b0 text to “ON”

}

}

The Nextion screen used is a NX8048P070-011…

You stated the display is connected via i2c but your code is apparently trying to communicate via ttl serial. You either need to connect the display via serial or you need display code for i2c.

sorry my mistake, it is connected to the Rx and Tx pins

So basically it’s working with the redboard “classic” and not with the redboard 'plus" with the exact same setup and wiring…