Search found 2574 matches

by Roberthh
Wed Apr 21, 2021 11:31 am
Forum: General Discussion and Questions
Topic: Can't import from directory
Replies: 3
Views: 58

Re: Can't import from directory

Using the proper path separator is essential. Maybe you should put aside pycharm for a moment and use a simple terminal emulator like putty. Or use Thonny.
Without the proper file separator, Spielwiesen is not a directory, but just the part of a file name.
by Roberthh
Wed Apr 21, 2021 11:28 am
Forum: ESP32 boards
Topic: Some pins are in HIGH mode after reboot
Replies: 1
Views: 14

Re: Some pins are in HIGH mode after reboot

but sometimes all pins of one side from D27 to VP (d27 d26 d25 d33 d32 d35 d34 VN VP) show about 1v or 0,8v.
What's that?
Just floating pins in input mode.
by Roberthh
Wed Apr 21, 2021 8:39 am
Forum: General Discussion and Questions
Topic: how to raise a keyboard exception
Replies: 2
Views: 34

Re: how to raise a keyboard exception

In you C code, call:

mp_keyboard_interrupt();
by Roberthh
Wed Apr 21, 2021 8:33 am
Forum: General Discussion and Questions
Topic: Can't import from directory
Replies: 3
Views: 58

Re: Can't import from directory

You have to add the directory name "Spielwiesen" to sys.path.
sys.path.append("Spielwiesen")
then you can" import wifi".
Edit: Also: the path component separator is "/" not "\".
by Roberthh
Wed Apr 21, 2021 8:29 am
Forum: General Discussion and Questions
Topic: MPY files not working (1.14)
Replies: 1
Views: 33

Re: MPY files not working (1.14)

AFAIK, boot.py and main.py must not be pre-compiled. You can have a short main.py, which imports a large compiled code.
by Roberthh
Wed Apr 21, 2021 8:23 am
Forum: General Discussion and Questions
Topic: [Solved] rshell timed out or error in transfer to remote: b'F'
Replies: 6
Views: 270

Re: rshell timed out or error in transfer to remote: b'F'

Depends which build you made and if you comparing the right ones. The pre-built one you cite is the build for 1MByte devices, which excludes quite a few modules. If you made a full build for 2MB+ devices, then it may be larger. P.S.: If I build just now, I get 611904 bytes. So your size is indeed pr...
by Roberthh
Wed Apr 21, 2021 8:15 am
Forum: Development of MicroPython
Topic: Attaching main.py into the build firmware.
Replies: 1
Views: 34

Re: Attaching main.py into the build firmware.

You can still put your code into the esp32/modules directory. I do not recall the state at the moment, but AFAIK main.py will not be called from frozen bytecode. So that has to be in the flash file system. But main.py can call your modules. In modules there is also _boot.py, which is executed before...
by Roberthh
Wed Apr 21, 2021 8:10 am
Forum: Programs, Libraries and Tools
Topic: More convenient pin initialization for ESP8266
Replies: 1
Views: 26

Re: More convenient pin initialization for ESP8266

You can set up a dictionary in your code that maps between the String labels and the Pin numbers. No need to change the firmware, especially since these mappings are vendor-specific.
by Roberthh
Tue Apr 20, 2021 7:13 pm
Forum: ESP32 boards
Topic: ADC input stuck on one level
Replies: 2
Views: 59

Re: ADC input stuck on one level

That's strange. With the 11db setting, you could try to connect the ADC input to GND and 3.3V. Then you should read 0 and 4095 as adc.read() value. That's what I tried here.
by Roberthh
Tue Apr 20, 2021 6:12 pm
Forum: Raspberry Pi microcontroller boards
Topic: RPI Pico Speed
Replies: 2
Views: 82

Re: RPI Pico Speed

Both is possible with machine.freq().
machine.freq() returns the actual setting
machine.freq(HZ-value) sets the new frequency. The suitable range is 12 - 270 MHz, but not all values in that range will be accepted.