Search found 1633 matches

by jimmo
Sun Feb 16, 2020 11:45 pm
Forum: ESP32 boards
Topic: SPI ESP32
Replies: 1
Views: 168

Re: SPI ESP32

Is the code in main.py (or imported and run from main.py)?

Probably the best thing to try is to add some print() statements to the code, copy the files onto the filesystem, open up the REPL, then hit Ctrl-D and you should see the code running.
by jimmo
Sun Feb 16, 2020 11:43 pm
Forum: ESP8266 boards
Topic: esp8266-20191220-v1.12.bin issues
Replies: 15
Views: 1102

Re: esp8266-20191220-v1.12.bin issues

jay2026 wrote:
Sun Feb 16, 2020 9:59 am
No sir im using linux mint so im using the shell terminal to communicate
But which program are you using to connect to the serial console? screen? miniterm? picocom? rshell?
by jimmo
Sun Feb 16, 2020 11:41 pm
Forum: General Discussion and Questions
Topic: Help with motor control - Sorry I am just learning
Replies: 6
Views: 401

Re: Help with motor control - Sorry I am just learning

Thanks Jimmo. I have been working on things a bit when I have had the chance. I think I have now got enough knowledge of functions to get down to some practical fun and games. Yes I now think I can make the method you explained work. Also found some cool ways to shorten down my code. Thanks for you...
by jimmo
Sun Feb 16, 2020 11:39 pm
Forum: ESP32 boards
Topic: ESP32 DOITv1 urequests.post issue
Replies: 4
Views: 257

Re: ESP32 DOITv1 urequests.post issue

Tried with the newest firmware, same story: Cool, thanks for re-posting to confirm this (I was going to suggest that otherwise). I think the fact that it's OSError(23) "'Too many open files in system'" combined with the fact that it happens exactly on the 9th request every time, makes the explanati...
by jimmo
Sun Feb 16, 2020 11:38 pm
Forum: ESP32 boards
Topic: ESP32 DOITv1 urequests.post issue
Replies: 4
Views: 257

Re: ESP32 DOITv1 urequests.post issue

This won't fix the issue, but it will help with memory usage -- try changing the while loop to: def read_and_send(): read_sensor() measures = collect() response = rq.post("http://blabla:9000/hooks/collector", data = measures.encode('utf-8'), headers = { "content-type": "application/json" }) while Tr...
by jimmo
Sun Feb 16, 2020 11:28 pm
Forum: ESP32 boards
Topic: ESP32 with Ublox NEO-6M
Replies: 9
Views: 686

Re: ESP32 with Ublox NEO-6M

nikanta wrote:
Sun Feb 16, 2020 6:57 pm
Then i get 'None' again as data.
The GPS will only send data over the UART periodically, so not every call to read() will return data.

But you also need to do more work to buffer and re-assemble lines. I assume this is what micropygps and as_GPS do.
by jimmo
Sat Feb 15, 2020 11:41 pm
Forum: ESP32 boards
Topic: ESP32 with Ublox NEO-6M
Replies: 9
Views: 686

Re: ESP32 with Ublox NEO-6M

Most GPS devices communicate with the host by sending NMEA data over a UART. You should be able to read this using machine.UART on the ESP32. NMEA is text based so it's easy to see whether you're getting data...my memory from debugging NMEA systems on boats is that it's something like $GPRMC is the ...
by jimmo
Sat Feb 15, 2020 11:37 pm
Forum: ESP32 boards
Topic: Reading GATT Data from Xiaomi Flower Care
Replies: 13
Views: 723

Re: Reading GATT Data from Xiaomi Flower Care

According to this specification I can split the last part into the green and brown octets that form the 16 bit Service UUID followed by additional service data. See https://github.com/micropython/micropython/blob/master/examples/bluetooth/ble_advertising.py for some basic parsing methods for this d...
by jimmo
Sat Feb 15, 2020 1:14 pm
Forum: General Discussion and Questions
Topic: Remove and Replace Printed characters in serial terminal
Replies: 5
Views: 298

Re: Remove and Replace Printed characters in serial terminal

Can you try using screen?

screen /dev/ttyUSB0 115200

(If you're new to screen, use "Ctrl-A k y" to quit)
by jimmo
Sat Feb 15, 2020 12:58 pm
Forum: ESP32 boards
Topic: Memory problem : iterate a file line by line
Replies: 3
Views: 249

Re: Memory problem : iterate a file line by line

My code is : for line in st.splitlines(): action ... And the error : MemoryError: memory allocation failed, allocating %u bytes What this code has to do is: - Read the whole file into a string - Make a new 1000-element list, and then create a short string for each line. So the total memory used is ...