Need help uploading modules to hardware

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
Post Reply
Swetha
Posts: 4
Joined: Fri Jun 11, 2021 8:43 am

Need help uploading modules to hardware

Post by Swetha » Fri Jun 11, 2021 8:54 am

How to upload modules in micropython.

User avatar
mattyt
Posts: 410
Joined: Mon Jan 23, 2017 6:39 am

Re: micropython

Post by mattyt » Sat Jun 12, 2021 2:13 am

Hello @Swetha and welcome to the forums. :)

There are a few ways to upload modules. Probably the most common is to copy files to your device over a serial connection with a tool like mpremote (pip install mpremote) or rshell.

It's also common for beginners to use a simple IDE. Two popular options are Thonny (tutorial for setup) and Mu, both of which allow copying of files to the device from within the application.

Even easier for beginners is that some devices - notably some of the STM32 micros - mount like a USB stick so you can just copy files to your device with your operating system.

Ports with wifi capabilities (ESP32 and Pyboard D) can also use upip to install packages hosted online. Care needs to be taken with this approach - it's currently easy to install incompatible packages - and I suggest avoiding this approach; I mention it only for completeness.

Let us know if you get stuck.

In the future, please use a more descriptive title so community members can see if the thread is relevant to them. For example, it would be best to change this thread to something like "Need help uploading modules".

User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: micropython

Post by pythoncoder » Sun Jun 13, 2021 1:29 pm

mattyt wrote:
Sat Jun 12, 2021 2:13 am
...
In the future, please use a more descriptive title so community members can see if the thread is relevant to them. For example, it would be best to change this thread to something like "Need help uploading modules".
Now done.
Peter Hinch
Index to my micropython libraries.

Swetha
Posts: 4
Joined: Fri Jun 11, 2021 8:43 am

Re: Need help uploading current sensor data to thingsboard using MQTT

Post by Swetha » Tue Jul 06, 2021 7:21 am

Swetha wrote:
Fri Jun 11, 2021 8:54 am
How to upload modules in micropython.
Hello Everyone,
May I know how to send SCT010T-D(Current sensor) data to Things board using Micropython code in VSCODE through MQTT.

User avatar
jimmo
Posts: 2754
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia
Contact:

Re: Need help uploading modules to hardware

Post by jimmo » Tue Jul 06, 2021 7:34 am

Swetha wrote:
Tue Jul 06, 2021 7:21 am
May I know how to send SCT010T-D(Current sensor) data to Things board using Micropython code in VSCODE through MQTT.
Please create a new thread rather than changing the topic of old threads.

As your question is fairly open-ended, can you please include some information about what you've tried already and what MicroPython hardware you have. Also what is a "Things board"?

As a starting point maybe take a look at https://github.com/peterhinch/micropyth ... er/mqtt_as

Post Reply