Search found 7 matches

by WRR
Sat Jun 01, 2019 6:55 pm
Forum: Programs, Libraries and Tools
Topic: mpy-cross, how to build binary for windows
Replies: 3
Views: 321

Re: mpy-cross, how to build binary for windows

Have you tried installing it with pip? It looks like it has Windows builds available on PyPi:

https://pypi.org/project/mpy-cross/

You can probably install it like a normal Python package:

Code: Select all

pip install mpy-cross
or

Code: Select all

pip3 install mpy-cross
by WRR
Mon May 20, 2019 3:20 pm
Forum: General Discussion and Questions
Topic: Greenhouses automation botnet. Need your advice.
Replies: 3
Views: 357

Re: Greenhouses automation botnet. Need your advice.

Very cool! Autonomous or semi-autonomous gardening and farming is a really exciting application of embedded devices. Good idea to use a Pi as a hub - you might also want to add a sort of 'heartbeat' notification to each ESP board so you can be quickly alerted if/when a node fails. Also, for environm...
by WRR
Mon May 13, 2019 3:29 pm
Forum: General Discussion and Questions
Topic: Custom Smaller Fonts for SSD1306
Replies: 3
Views: 369

Re: Custom Smaller Fonts for SSD1306

It probably depends on what you need for your application, but you can see how the default font is defined and structured in its header file: https://github.com/micropython/micropython/blob/master/ports/stm32/font_petme128_8x8.h If you look for, "font_petme128" in the framebuffer module file, you'll...
by WRR
Mon May 06, 2019 10:19 pm
Forum: MicroPython pyboard
Topic: HMC5883L Magnetometer
Replies: 10
Views: 765

Re: HMC5883L Magnetometer

If your sensor acknowledges the I2C transaction but still returns all zeros for the data, it's also possible that the sensor is damaged. Especially with cheap modules from "no-name" sources, you can sometimes get parts from a bad batch. I've received accelerometer/gyroscope sensors which were able t...
by WRR
Mon May 06, 2019 6:40 pm
Forum: General Discussion and Questions
Topic: Connecting to AWS with MQTT
Replies: 12
Views: 4071

Re: Connecting to AWS with MQTT

To summarize james_km69's example, it looks like this works for publishing MQTT messages with SSL: import machine from network import WLAN import network from umqtt.simple import MQTTClient # Setup WiFi connection. wlan = network.WLAN( network.STA_IF ) wlan.active( True ) wlan.connect( "WiFi_ssid", ...
by WRR
Mon May 06, 2019 3:20 pm
Forum: General Discussion and Questions
Topic: Assembler Errors
Replies: 3
Views: 298

Re: Assembler Errors

'as' is a dedicated assembler, while 'gcc' is more multi-purpose. The '-x' option tells GCC which language it is compiling, and it looks like your current flags tell it that the language is 'assembler-with-cpp' to have GCC act as an assembler. I think that 'as' probably doesn't recognize that option...
by WRR
Thu May 02, 2019 4:10 pm
Forum: Development of MicroPython
Topic: question about GC
Replies: 3
Views: 355

Re: question about GC

The documentation has a good explanation of how 'gc.threshold' works - I could be misreading it, but it sounds like it tells the allocator to run GC once N more bytes have been allocated after the `gc.threshold(N)` call. http://docs.micropython.org/en/v1.9.3/pyboard/library/gc.html#gc.threshold If y...