Xinyuan-LilyGO / T-Vending

5 stars 3 forks source link

T-vending RS485 circuit power on? #2

Open luisgcu opened 9 months ago

luisgcu commented 9 months ago

I have 2 t-vending boards and I am trying to use the RS485 onboard, but still not sure what have to be done to power the RS485 circuit?
I measured and is 0v. Update! 12/20/2023 , I was measuring the voltage using the wrong ground, since the RS485 section is Isolated from the ground of the ESP32, to measure the RS485 circuitry section voltages is MGND

I have set this 2 line of code on setup but still no power supply on the RS485 circuitry.

// Peripheral power supply is enabled, the Pin must be set to HIGH to use PCIE, RS485
    pinMode(BOARD_POWER_ON, OUTPUT);
    digitalWrite(BOARD_POWER_ON, HIGH);

Another question is what this lines of code do? is square signal 1ms on/off? ( still need to clarify this)

     pinMode(GPIO_PUSE, OUTPUT);
     paues.attach_ms(1000, []() {
        digitalWrite(GPIO_PUSE, 1 - digitalRead(GPIO_PUSE));
    });

Thanks a lot.

lewisxhe commented 1 month ago

BOARD_POWER_ON is commented out as hardware power control

GPIO_PUSE has no function, just a pulse output