Search found 5 matches

by dlynch13
Tue Jun 15, 2021 7:09 am
Forum: General Discussion and Questions
Topic: How to send binary data to the REPL?
Replies: 8
Views: 4101

Re: How to send binary data to the REPL?

I am using a custom developed board, not the actual official pyboard, and I learned that the buffer was indeed set to 256 in my MicroPython firmware build. Using a small delay was intermittently failing, so I had to keep increasing it. I modified the code to use the ACK, so that the board sends the ...
by dlynch13
Fri Jun 11, 2021 8:11 pm
Forum: General Discussion and Questions
Topic: How to send binary data to the REPL?
Replies: 8
Views: 4101

Re: How to send binary data to the REPL?

OK, I got it running. Here is the code on the pyboard side: import micropython import sys class RECV_TEST(): def __init__(self): self.bufsize = 256 self.read_buffer = bytearray(self.bufsize) return def recv_test(self): # Disable ctrl-c micropython.kbd_intr(-1) bytes_read = sys.stdin.buffer.readinto(...
by dlynch13
Fri Jun 11, 2021 3:46 pm
Forum: General Discussion and Questions
Topic: How to send binary data to the REPL?
Replies: 8
Views: 4101

Re: How to send binary data to the REPL?

Wouldn't the REPL still receive all data as strings, including newline? How do I suppress the REPL temporarily to ignore the incoming data and instead readirect it *somewhere* that I can access with my SPI write function? The only way I know to do this is just call a spi_write(b'\xff') function to t...
by dlynch13
Tue Jun 08, 2021 9:46 pm
Forum: General Discussion and Questions
Topic: How to send binary data to the REPL?
Replies: 8
Views: 4101

How to send binary data to the REPL?

Background: I want to use the ST MCU on the pyboard to flash a SPI ROM, which will receive the data dynamically from the host PC. I don't want to use the mapped drive. I would like to use only the REPL to accomplish this. I am able to transfer commands/source to the REPL using the pyboard.py, no pro...
by dlynch13
Wed Feb 17, 2021 10:21 pm
Forum: Programs, Libraries and Tools
Topic: Where is actual library source?
Replies: 1
Views: 1060

Where is actual library source?

I am new to MicroPython and been looking through docs, books and the forum for days to the answer to these questions. 1. Is the pyb library only to be used for the Pyboard? What if I have a custom STM32 project as I am planning? Should I then be using the machine library instead? My pinout will like...