Skip to content
This repository was archived by the owner on Feb 20, 2021. It is now read-only.

Write MicroPython examples and tools for Portenta #25

Closed
Chester-King opened this issue Feb 26, 2020 · 6 comments
Closed

Write MicroPython examples and tools for Portenta #25

Chester-King opened this issue Feb 26, 2020 · 6 comments
Labels

Comments

@Chester-King
Copy link

Greetings,
I am Madhur Dixit, a third year student pursuing Btech in Computer Science and Engineering from Vellore Institute of Technology, Vellore, India.

I am looking forward to making valuable contributions to the Arduino and Portenta repositories.
I have worked extensively with various microcontrollers including arduino UNO, MEGA, Node MCU and raspberry pi. I am actively involved in working with IoT, Cloud and android. I have also developed various applications which involve connection of the microcontrollers to the cloud for sending and receiving information from it.The project I am interested in for the year 2020 iteration of GSoC is "Write MicroPython examples and tools for Portenta".

I support my endeavor to work on this project because I am well-versed with python on raspberry pi and C++ on arduino. I looked up examples of MicroPython scripts on the internet to perceive what exactly I was getting into. Upon seeing the data available on it, I was assured that I would be able to work on this project concerning writing examples about using MicroPython on a Portenta board and achieve optimal results.

Thanks & Regards

@Chester-King
Copy link
Author

Hello @alranel

So I was wondering from where I should start and I found this simple simulator where we can actually run MicroPython scripts

So I developed this very basic MicroPython Script of sweep for servo motors

# Using the Servo
# Make sure you have the Servo checkbox marked!

import machine
import pyb
import time

# The pyboard has four simple servo connections
servo = pyb.Servo(1)
while(1):
    for x in range(-90,91):
        servo.angle(x, 5000)
        time.sleep_ms(15)
    for x in range(90,-91, -1):
        servo.angle(x, 5000)
        time.sleep_ms(15)

I would love to know if I am going in the right direction i.e. do we have to write MicroPython example for the Portenta board just like in the Arduino IDE it is given for all the official libraries ?

@alranel
Copy link
Contributor

alranel commented Mar 3, 2020

@Chester-King that is a good start, if it works :-) If you are accepted as a GSoC student you'll get a Portenta board so that you can test your code. You'll need to connect hardware to it to test the various features.
Porting the Arduino examples to it would be a good idea.

@Chester-King
Copy link
Author

Hello @alranel

https://github.com/Chester-King/MicroPython-NodeMCU-Installation
So, I was able to run MicroPython on NodeMCU. Here is the repository I created with the installation guide so that if anyone wants to try MicroPython on NodeMCU they can use this step by step guide. I will now start porting arduino examples in Micropython and test them on NodeMCU.

Thanks & Regards

@Chester-King
Copy link
Author

Hello @alranel

  • So for the past few days I've been porting Arduino Examples to MicroPython and testing them on my NodeMCU. If you want you can take a look at all the ported examples till now here. I've only pushed an example to this repository after testing it on NodeMCU.
  • I've also made a PR on the Servo Examples. You can take a look at it here.
  • I am planning on making several more PRs and Porting examples to MicroPython in coming days. While Porting I have tried to keep the same variable names. However I have yet to comment the explanation of the MicroPython Codes which I will do very soon.
  • I will be submitting my draft in the next couple of days for review.

Thanks & Regards

@Chester-King
Copy link
Author

Hello @alranel @per1234

I have uploaded the draft proposal regarding the project Write MicroPython examples and tools for Portenta on GSoC site. I request you to review it and comment on the google doc if I there is any room for improvement.

Key Points of the proposal

  • 10 Examples from Arduino IDE ported to MicroPython and tested on NodeMCU. You can take a look at the examples at this repository
  • the PRs made and Issue addressed recently mention in the proposal
  • Two Project demo videos of personal projects done in the past mentioned with documentation repository of the project code. To show the capability of building and demonstrating the prototype using portenta.

Thanks & Regard,
Madhur Dixit
Email: dmadhur6@gmail.com

@Chester-King
Copy link
Author

Hello @alranel @per1234

Although I didn't get selected this year. I still intend to contribute towards the code repositories of portenta when they are finalized. Thanks for the support till now.
Looking forward to contribute to the community.

Thanks & Regard,
Madhur Dixit
Email: dmadhur6@gmail.com

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants