B4R Question Wemos D1 R2 analog pin A0

tzfpg

Active Member
Licensed User
i like to ask how to make wemos A0 pin output 3.3v?
like this code:
B4X:
 dim a_pin As Pin
a_pin.Initialize(a_pin.A0,a_pin.MODE_OUTPUT)
a_pin.DigitalWrite(True)

my all digital pin already fully in used, now left A0.
 

Peter Simpson

Expert
Licensed User
Have you seen this tutorial?
You can use three digital pins on your D1 mini to control 8 outputs. The operating voltage of the shift register is between 2.0V to 6.0V. If you put 3.3V to the VCC pin, you will get 3.3V out of the 8 pins, if you put 5V into the VCC pin, you will get 5V out.

https://www.b4x.com/android/forum/t...8-relays-wemos-d1-mini-wifi-android-4g.80909/

If I was you I would use a shift register, but that's only if you do not fancy purchasing a NodeMcu which has more digital pins...
 
Upvote 0

tzfpg

Active Member
Licensed User
Have you seen this tutorial?
You can use three digital pins on your D1 mini to control 8 outputs. The operating voltage of the shift register is between 2.0V to 6.0V. If you put 3.3V to the VCC pin, you will get 3.3V out of the 8 pins, if you put 5V into the VCC pin, you will get 5V out.

https://www.b4x.com/android/forum/t...8-relays-wemos-d1-mini-wifi-android-4g.80909/

If I was you I would use a shift register, but that's only if you do not fancy purchasing a NodeMcu which has more digital pins...

sure i had try, but i no more three pin for use shift register, my wemos connect to 2 rfid, 1 real time clock and 1 external eeprom.
 
Upvote 0

Peter Simpson

Expert
Licensed User
Well in that case you should use a 16 I/O expander IC like this one https://www.b4x.com/android/forum/t...575-16-bit-i-o-extension-shield-module.81544/

You can use either the PCF8575 in the link above or an MCP23017 to expand your WeMos D1 mini up to 16 I/O pins by using only 2 of your original I/O pins on your WeMos D1 mini(D1 and D2). Both the IC's are controlled through I²C Bus communications.

Or buy a NodeMcu...
 
Last edited:
Upvote 0
Top