Search found 3466 matches

by dhylands
Sat Aug 29, 2020 12:25 am
Forum: Programs, Libraries and Tools
Topic: MCP23008 General Purpose Driver
Replies: 8
Views: 531

Re: MCP23008 General Purpose Driver

For the MCP23008, I would expect you would only use readfrom_mem. This is basically a combined write/read. addr is the address of the i2c device. memaddr is the register that you want to read. It will first send memaddr (which would be the register number) and then do a read of a nbytes bytes. Even ...
by dhylands
Fri Aug 28, 2020 9:37 pm
Forum: Programs, Libraries and Tools
Topic: MCP23008 General Purpose Driver
Replies: 8
Views: 531

Re: MCP23008 General Purpose Driver

I took a look at the datasheet and yeah you could add the extra \x00 to write to the OLAT register for initialization. It turns out that writing to the GPIO register also writes to the OLAT register, so it doesn't make too much difference one way or the other. Note that if you use writeto_mem then y...
by dhylands
Fri Aug 28, 2020 3:15 pm
Forum: Programs, Libraries and Tools
Topic: MCP23008 General Purpose Driver
Replies: 8
Views: 531

Re: MCP23008 General Purpose Driver

Adafruit has an i2c LCD backpack. I have working code for that backpack (I know it works on the pyboard 1.1) You can see it here: https://github.com/dhylands/python_lcd/blob/master/lcd/pyb_i2c_adafruit_lcd.py This line: https://github.com/dhylands/python_lcd/blob/a3e6c776059487bceabcb8a24b0d5e24574c...
by dhylands
Fri Aug 28, 2020 1:46 am
Forum: ESP32 boards
Topic: Testing if ubinascii.unhexlify exists ...
Replies: 6
Views: 289

Re: Testing if ubinascii.unhexlify exists ...

rshell sends 20 Control-C's (one every 100 msec) and looks for the >>> prompt. If it doesn't find it, then it gives up. You need to fix the: FAT filesystem appears to be corrupted. If you had important data there, you may want to make a flash snapshot to try to recover it. Otherwise, perform factory...
by dhylands
Thu Aug 27, 2020 3:56 pm
Forum: MicroPython pyboard
Topic: [SOLVED] can't connect to REPL
Replies: 14
Views: 886

Re: can't connect to REPL

If you get the "busy" error that means that some other process already has the port open.

You should be able to use the lsof command to determine who has the port open:

Code: Select all

$ lsof | grep ttyACM0
by dhylands
Wed Aug 26, 2020 9:49 pm
Forum: Other Boards
Topic: STM32F207ZGT6
Replies: 1
Views: 146

Re: STM32F207ZGT6

I don't see the F2 HAL shown in the list of HAL's: https://github.com/micropython/stm32lib ... 2990270ecc
so I would say that it's currently unsupported.
by dhylands
Tue Aug 25, 2020 4:49 pm
Forum: Other Boards
Topic: [WeActSTM32F411CEU6] network.WLAN
Replies: 2
Views: 209

Re: [WeActSTM32F411CEU6] network.WLAN

The WeActSTM32F411CEU6 board has no hardware for WAN or LAN.

The pyboard (1.0 and 1.1 series) also has no WAN or LAN hardware. The Pyboard-D, ESP32, and ESP8266 all have WAN hardware builtin.
by dhylands
Sat Aug 22, 2020 7:19 pm
Forum: General Discussion and Questions
Topic: How do I get the make_new function in my module to be called
Replies: 2
Views: 177

Re: How do I get the make_new function in my module to be called

make_new is called when an instance of a class is created. This is effectively the constructor for the class. There is no make_new method associated with modules, however if your module instantiates an object the the make_new method from the class for that instance will be called.
by dhylands
Thu Aug 20, 2020 3:16 pm
Forum: General Discussion and Questions
Topic: Filesystem size with custom STM32F7 build
Replies: 35
Views: 2988

Re: Filesystem size with custom STM32F7 build

It will depend on your exact device. Some of the F7s only have 256k of RAM.

It looks like the F767 has 384K of RAM and 128K of DTCM.

Whether 128k of ram is enough would depend on your programs (it’s enough for micropython).

I don’t think that anybody has ever tried to do what you want.
by dhylands
Thu Aug 20, 2020 3:11 pm
Forum: MicroPython pyboard
Topic: Pyboard.py
Replies: 8
Views: 511

Re: Pyboard.py

On Windows you need to tell it the com port using the -device parameter (I.e. something like

Code: Select all

pyboard.py -device COM7 foo.py
replace COM7 with the correct com port for your setup. /dev/ttyAMA0 only works under Linux.