adding a little note :
the command for ALLINPUTS is hex 0xFF which is 0b11111111 in binaries
I am quite sure all the 1 are the pins (pin0 being on the right). with 1 being input and 0 being output.
So 0b11111110 ( hex 0xFE) would probably be all inputs except pin 0 as output etc
and hex (0x0) is 0b00000000 and actually correspong to the value of ALLOUTPUTS in the other library ...
Best posts made by frexetat
-
RE: Extend I/O (EXT_IO) how to read inputs? (arduino)
Latest posts made by frexetat
-
RE: video stream (computer desktop) to m5stickc plus
adding notes :
the M5stickc plus uses an AXP192 for power management (including display), all the functions to initialise it are inside the M5StickCPlus but you can't call this library in same time as TFT_eSPI.h.
you will have to copy AXP192.h & AXP192.cpp from the M5StickCPlus lib and put it in your project (change the names).If you have a M5 project loaded in your stick and then upload a sketch using TFT_eSPI, it will work the first time as the display is already power on from the previous m5 sketch but the display won't turn back on on the next restart unless you init the AXP192 like explained.
hope it helps anyone!
-
RE: video stream (computer desktop) to m5stickc plus
@flypeek said in video stream (computer desktop) to m5stickc plus:
genius, I completely miss that part and was trying to set my pins in my main sketch.
thank you so much I am in -
RE: Displaying JPEG Images on M5StickC
@boverby
the link is dead would you mind sharing your code ?
I am trying to stream to a m5stickc plus, what you did would be a good reference to look at ! thank you -
RE: Ext.io GPIOs as inputs ?
hey I saw you are also on this other thread:
https://forum.m5stack.com/topic/4633/extend-i-o-ext_io-how-to-read-inputs-arduino/14I posted my fix there .
-
video stream (computer desktop) to m5stickc plus
Hey guys,
did anyone manage to get a video stream sent to the m5stickc plus?
I tried arduinovnc (https://github.com/arrowmeiwaracing/arduinoVNC?fbclid=IwAR1vOuny18o9wrglFqjgbwdrZoi4gQcSjo3NIENHpCoqyYhq_stlqAebrO8)
Everything seems to work in term of connection etc but I get stuck with a single glitchy frame :/I also found this that look even more promising
https://blog.chaosgoo.com/2020/12/14/ESP32-Streaming/
but same, I got everything running (python get the connection and the m5 print on the serial that he is receiving the frames ) except nothing is showing on the screen :s
I pretty much left the code as it is ( using the TFT_eSPI lib ) and thats probably what is wrong, I assume everything should be using m5.lcd instead.
I have no idea how to do this, if anyone understand it , any feedbacks would be welcome ))thank you!
-
RE: Extend I/O (EXT_IO) how to read inputs? (arduino)
adding a little note :
the command for ALLINPUTS is hex 0xFF which is 0b11111111 in binaries
I am quite sure all the 1 are the pins (pin0 being on the right). with 1 being input and 0 being output.
So 0b11111110 ( hex 0xFE) would probably be all inputs except pin 0 as output etc
and hex (0x0) is 0b00000000 and actually correspong to the value of ALLOUTPUTS in the other library ... -
RE: Extend I/O (EXT_IO) how to read inputs? (arduino)
@teastain it happens that calling the function to read just would give always 1 no matter what. Didn't matter if it was in output / INPUTALL or anything.
I believe there is something wrong with the read function in this library.The code I shared works without any issues.
Pull up resistors are not needed, I don't have any and it works just fine ::) -
RE: Extend I/O (EXT_IO) how to read inputs? (arduino)
Hey guys thanks for your reply.
I ended up not using this library at all.
In my case I need all the pins to be inputs which is convenient.here is my code if its helpful for anyone ( what I get is one binary number containing all the pins , which I turn into a decimal (0-255) and then use masking (& 128, & 64 ..etc to get all separate button's values):
#include <Wire.h>
#include <M5StickCPlus.h>#define IOEXT_addr 0x27
#define CONFIGPORT0 0x03
#define ALLINPUT 0xFFbyte rdata = 0xFF;
void setup() {
M5.begin();
Wire.begin();Wire.beginTransmission(IOEXT_addr);
Wire.write(CONFIGPORT0);
Wire.write(ALLINPUT);
Wire.endTransmission();delay (50);
Wire.beginTransmission(IOEXT_addr);
Wire.write((uint8_t)0);
Wire.endTransmission();
}void loop() {
Wire.requestFrom(IOEXT_addr,1);
if (Wire.available()) rdata = Wire.read();
Serial.println (String(rdata, DEC));
}
-
Ext.io GPIOs as inputs ?
Hello,
does anyone manage to use the EXT.IO unit's Gpios as input ?
There is an example provide for this unit in the M5sticks pro library but it covers only outputs.
there is this thread talking about the same problem ( I got the exact same result) :
https://forum.m5stack.com/topic/4633/extend-i-o-ext_io-how-to-read-inputs-arduino/9but it doesn't look like it got resolved
Searching online weirdly doesn't goes anywhere, like if nobody would use this unit which is a bit weird.Any help would be really welcome!
thank you
-
RE: Extend I/O (EXT_IO) how to read inputs? (arduino)
@teastain said in Extend I/O (EXT_IO) how to read inputs? (arduino):
@marelli7
Hello,
did you ever figured it out, I am trying to do the same thing but no luck.
It's quite crazy I couldn't find anyone talking about this online !!thanks