-
Hi,
I'm currently trying to use UART Serial1 on GPIO 10 and GPIO 11. I've got it working and can communicate between it and the ESP32 I have attached. The only problem is that this is only the case when I'm connected via BLE on the Espruino IDE. As soon as I'm not connected, Serial1 doesn't send or receive transmissions. I've read that connecting GPIO0 to UART will enable this at startup but I was wondering is there anyway for me to use the pins above? -
I thought the same as having searched the forums, I couldn't come across something similar. I ended up implementing a function that allowed me to provide an offset and length, allowing me to iterate through the directory structure in chunks. I realise it's very niche which is why I've not raised a PR for it. I appreciate the help and feedback, gave me the direction I needed to go in.
-
That's a good idea, some are images so they can definitely be stored in flash. Some are constructed from what I read from the SD Card though but they're relatively small. I've also re-written most of the JS to reuse pointers rather than creating new variables.
I like the idea of using an iterator, I was thinking about adding offset parameters to readdir but I think returning and iterator would be better. I'll investigate. Also the ability to get a total count, but that should probably be a separate function call. I like that idea a lot.
-
I do have a lot of other code there and I've tried to use memory saving options where possible such as typed arrays. I'll update my functions to use objects also, but they mostly only have one parameter or two at most. Unfortunately the plan was to be able to read 150+ files in a directory at a later stage. Interestingly, saving files to flash and getting a list of them works fine.
I'll try it with an empty puck.js and just the code to read the SD card and compare the memory profile to my full app.
-
Hi all,
I've connected an SD Card via SPI to my Puck.js. I was hoping to get a full list of a directory (40+ files) and be able to iterate through them using a click. Unfortunately I get a low memory error when trying to read a directory. Is there any way to get a full directory listing? I don't mind recompiling firmware to make it happen. -
I figured it out thanks to your insight. I drew 3 squares of red blue and green and they were correct so I looked into the encoding of the image and it looks like that was the problem. I used this tool (http://www.rinkydinkelectronics.com/_t_doimageconverter565.php) to generate a RGB565 raw image and it worked perfectly. Thanks for the help!
-
-
Hi, hopefully someone can point me in the right direction.
I've been working with a ST7789V LCD controlled by an NRF52832, I'm trying to draw images using LCD_SPI_UNBUF but unfortunately the colours always seem to be incorrect.
So far I've set the the screen RGB mode using the 0x36 command and 0x8 but apart from that I'm struggling. I'm sending a raw image file directly to the lcd via SPI. The reds look nearly correct and I'm using a raw image file in a 16bpp RGB565 format. Is there something I'm missing, so far I'm unsure if it's the format of the image file or something I'm missing with the palette. I'm wondering if sending the raw image file directly to the LCD is in the incorrect format having looked at the datasheet but currently lack the hardware to test this. Any advice would be hugely appreciated!I'll add an image later today.
Thanks fanoush, that has sorted it. Really appreciate the help.