Most recent activity
-
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!
Thanks fanoush, that has sorted it. Really appreciate the help.