Search found 1461 matches

by Roberthh
Wed Jun 26, 2019 7:55 pm
Forum: Pyboard D-series
Topic: building for BOARD=PYBD_SF to get _threads compiled in
Replies: 5
Views: 176

Re: building for BOARD=PYBD_SF to get _threads compiled in

.@nherriot Usually the switches are set in the port-specific mpconfigport.h, located in stm32, or the board-specific mpconfigboard.h, located e.g. in stm32/boards/PYBD,_SF2.
Setting the switch in py/mpconfig.h affects all builds in all ports, which may not be the intention.
by Roberthh
Wed Jun 26, 2019 6:54 pm
Forum: MicroPython pyboard
Topic: ADC measure negative voltage??
Replies: 23
Views: 584

Re: ADC measure negative voltage??

The A3V3 can be used as 3.3 V reference.
by Roberthh
Wed Jun 26, 2019 10:58 am
Forum: General Discussion and Questions
Topic: double precision float on ESP8266
Replies: 29
Views: 901

Re: double precision float on ESP8266

Yes, you have to follow the instructions step by step. Typical errors I use to make: a) Wrong version checked out (this error is shown in your log): In the esp-idf directory run the commands: git checkout 6b3da6b1882f3b72e904cc90be67e9c4e3f369a9 git submodule update --init b) Forgot git submodule in...
by Roberthh
Wed Jun 26, 2019 6:02 am
Forum: General Discussion and Questions
Topic: double precision float on ESP8266
Replies: 29
Views: 901

Re: double precision float on ESP8266

The place to change is mpconfigport.h in the esp32 directory. Change line:

#define MICROPY_FLOAT_IMPL (MICROPY_FLOAT_IMPL_FLOAT)
into
#define MICROPY_FLOAT_IMPL (MICROPY_FLOAT_IMPL_DOUBLE)
by Roberthh
Tue Jun 25, 2019 10:23 am
Forum: ESP8266 boards
Topic: How to switch on a electric bulb with ESP8266 board?
Replies: 50
Views: 1659

Re: How to switch on a electric bulb with ESP8266 board?

You should try the driver made by @pythoncoder https://github.com/peterhinch/micropyth ... ter/DS3231
It was made for PyBoard, ESP8266 and others.
by Roberthh
Tue Jun 25, 2019 6:42 am
Forum: MicroPython pyboard
Topic: ADC measure negative voltage??
Replies: 23
Views: 584

Re: ADC measure negative voltage??

Depending on the range of the negative voltage and it's impedance, a voltage divider may work, just between Vdd-ADC_Input-Sensing_Input instead of GND-ADC_Input-Sensing_Input. Don't forget to add a protective Diode to the input, so it cuts off negative voltages.
by Roberthh
Mon Jun 24, 2019 10:18 am
Forum: ESP8266 boards
Topic: How to switch on a electric bulb with ESP8266 board?
Replies: 50
Views: 1659

Re: How to switch on a electric bulb with ESP8266 board?

You can control that by the initial value of i 0 or 1. If you want the behaviour to change in certain times, you need to know the real time. But you were at that question before.
by Roberthh
Mon Jun 24, 2019 5:45 am
Forum: ESP32 boards
Topic: MCP23017
Replies: 2
Views: 128

Re: MCP23017

This line:

io = MCP23017()

should be:

io = mcp.MCP23017()
by Roberthh
Sun Jun 23, 2019 9:05 pm
Forum: Pyboard D-series
Topic: How network.WLAN reports a mac address
Replies: 2
Views: 125

Re: How network.WLAN reports a mac address

The byte string is all bytes, 6 in total. H is just a byte with the hex value 0x48, J is 0x49, 0 is 0x30, so all in all it is:
48:49:30:01:b2:d0. To see the usual representation, you can convet it to hex using ubinascii.hexlify()
by Roberthh
Sat Jun 22, 2019 8:06 pm
Forum: General Discussion and Questions
Topic: Tuple as parameter for ifconfig / tuple parameters as variables
Replies: 1
Views: 80

Re: Tuple as parameter for ifconfig / tuple parameters as variables

generally it should work. Since this ifconfig seems to be in a class, visibility of ip, netzmakse, ... may be an issue. Try to use self.ip, self.netzmaske, ...