Search found 964 matches

by Roberthh
Mon Aug 20, 2018 7:03 am
Forum: Programs, Libraries and Tools
Topic: Matrix library for MicroPython
Replies: 13
Views: 321

Re: Matrix library for MicroPython

Performance gains seen in my tests: Python Code -> Python native code : factor of 2 Python Code -> Viper code: factor of 10 (at least) Viper code -> Assembly code: factor of 2 I expect C code performance to be between Viper and Assembly code. For code longer than a few statements, Native, Viper and ...
by Roberthh
Thu Aug 16, 2018 8:59 am
Forum: ESP8266 boards
Topic: Frozen bytecode main.py
Replies: 6
Views: 110

Re: Frozen bytecode main.py

you can freeze any python script, which is about to be imported. And you can simply try it.
by Roberthh
Thu Aug 16, 2018 8:15 am
Forum: ESP8266 boards
Topic: Frozen bytecode main.py
Replies: 6
Views: 110

Re: Frozen bytecode main.py

That should work. I only would not call that file main.py, to avoid conflicts. You can give is any other name. In addition you can have a main.py in your file system, which then might be empty. abd obviously, if your file is called "myfile.py", the statement should read:
import myfile
by Roberthh
Wed Aug 15, 2018 7:15 am
Forum: ESP8266 boards
Topic: Frozen bytecode main.py
Replies: 6
Views: 110

Re: Frozen bytecode main.py

The resepctive code is around https://github.com/micropython/micropython/blob/master/ports/esp8266/main.c#L68 There you see, that a file called _boot.py is run from flash, and that boot.py and main.py are run form the file system. You can either change the call for boot.py and main.py into pyexec_fr...
by Roberthh
Sat Aug 11, 2018 4:44 pm
Forum: ESP32 boards
Topic: ESP32 and LoRa
Replies: 58
Views: 6630

Re: ESP32 and LoRa

As said, you can port the Pycom software to another ESP32 board. You have to adapt: - the memory configuration (The Pycom software expects 4 MByte SPRAM and 8 MByte flash with a rev 1 chip) - the GPIO ports for the SC1272 chip All of the is not too complicated, but I do not think it's worth the effo...
by Roberthh
Sat Aug 11, 2018 8:58 am
Forum: ESP8266 boards
Topic: Custom modules in v1.9.4-443 firmware now boot.py and main.py won't load
Replies: 3
Views: 70

Re: Custom modules in v1.9.4-443 firmware now boot.py and main.py won't load

Did you place boot.py and main.py into frozen bytecode too, or did you leave it in the flash file system?
by Roberthh
Sat Aug 11, 2018 6:17 am
Forum: The WiPy and CC3200 boards
Topic: How to update FW of Wipy 1.0
Replies: 3
Views: 76

Re: How to update FW of Wipy 1.0

I did not know (or forgot) the WIPy repository you mentioned. Anyhow, the latest binaroes are at http://micropython.org/download#wipy. Obviously the device needs a bootloader, and I faintly remember to upload firmware by wire. Must be somewhere in the documentation. In the micropython docs there is ...
by Roberthh
Fri Aug 10, 2018 8:49 am
Forum: General Discussion and Questions
Topic: uos vs os
Replies: 2
Views: 95

Re: uos vs os

In the ESP32 and STM32 (and others too) versions, os is defined as alias to uos, so you can also use:
import os
The definition is in the port specific file mpconfigport.h
by Roberthh
Fri Aug 10, 2018 6:59 am
Forum: The WiPy and CC3200 boards
Topic: How to update FW of Wipy 1.0
Replies: 3
Views: 76

Re: How to update FW of Wipy 1.0

No, looks ok. The image path is defined as /flash/sys/mcuimg.bin, so I do not know whther the leading / makes a difference.
from the code:

Code: Select all

#define UPDATER_IMG_PATH "/flash/sys/mcuimg.bin"
by Roberthh
Wed Aug 08, 2018 12:29 pm
Forum: The MicroPython pyboard
Topic: Reading raw binary GPS from serial and writing to SD card with pyboard
Replies: 2
Views: 91

Re: Reading raw binary GPS from serial and writing to SD card with pyboard

Do you have examples on how the files should look like and how it looks instead?
b.t.w.:
This code looks overly complicated. Why, in the inner loop, do you not simply write:

Code: Select all

while True:
  while ser.any()==0:
    led2.toggle()  
 
  z=ser.readline()
  led.toggle()
  newFile.write(z)