Stamp ext IO2 (SKU:S002) able to use individual pins, not just one mode for the whole board!
-
Hello @teastain
I've just created a pull-request in the github repository which adds a function to set the mode of a single pin.
Thanks
Felix -
This post is deleted! -
Hi! @macsbug thanks for responding, I usually use the Adafruit library because it Works! Easily! Logically!
Actually I'm referring to the Stamp io2 ext module which is accessed via I2C.
The resident controller is an STM, the Stamp has to send the request through I2C and be executed by the STM !
Terry -
@felmue Thanks Felix, I'll try it once The Powers That Be approve !!!
Does it work for you?
Thanks Terry -
Hello @teastain
yes, it works for me. I've tested it with pin 2 as RGB output, pin 5 as digital output and the rest as digital inputs.
extio.setAllPinMode(DIGITAL_INPUT_MODE); extio.setPinMode(2, RGB_LED_MODE); extio.setPinMode(5, DIGITAL_OUTPUT_MODE);
Thanks
FelixP.S. be prepared that approval could take some time. In the past some of my pull-requests took almost a full year to be approved by M5Stack.
-
-
Hello @teastain
FYI: I stand corrected. My pull-request already has been approved. Nicely done M5Stack.
Thanks
Felix -
@felmue GOOD JOB!
I downloaded the new library and made a mixed program with one pin Output and another RGB...
Works perfectly. I studied your library...maybe next time I will try!
Much thanks, Terry -
@felmue Hi Felix, me again.
Regarding the PaHub:
I found the Official M5Stack PaHub example to be of little help to write a useful project with 2 sensors with the same I2C address. I made this example very minimalist using a M5Stack Core Basic controller.
PaHub Example with 2 ENVII temperature sensors:
I put it on GitHub https://github.com/teastainGit/Simple-PaHub-example
Would you have time to look it over and "Maybe" submit it to M5Stack? To be added to their example for PaHub?
If not could you tell me how to submit it? I am asking you because you have a great reputation with them!!!
Cheers! Terry -
Hello @teastain
your example looks fine to me. Nicely done.
Regarding submission: you can create a pull-request for yourself, inside the M5Stack repository, which adds your example and M5Stack engineers eventually will check it out.
Thanks
Felix