arduino / summer-of-code

Arduino @ Google Summer of Code
40 stars 51 forks source link

Writing Examples in Micropython for Portenta board #43

Closed mgtm98 closed 3 years ago

mgtm98 commented 4 years ago

I am Mohamed Gamal, a 22 year old Computer Engineering student from Egypt (3rd year Ain Shams University) and i'd like to introduce my self for GSOC20 .

I started studying programming since I was 15 years old. Since then I studied many languages in various fields

  1. (HTML, JS, CSS) for web devolopment
  2. (JAVA - C#) for desktop apps

In the university I studied C,C++,python and for the first time I worked in the field of robotics starting from lighting a led, RC cars to making a dron and i am currently in a team (Ain Shams University Racing Team ROV software member) making an ROV for the mate competition. I also studied computer vision (openCV) as we are using it in mate competition (https://materovcompetition.org/)

My Experiences:

My projects:

I would like to work on this project as my field of study is related to it and I'm interested in robotics field in general. I have written many libs. for micropython before and for me it will be a challenging project to participate in.

mgtm98 commented 4 years ago

Samples of uPython code

Web server example (server library https://github.com/mgtm98/Nodemcu-WebServer)

'''
Example code for the (http) server library
Author : Mohamed Gamal
Date : 2/3/2020

http server to control the rgb led in tiva-c
    -esp32 is connected to tiva-c through UART1
    -web page have 7 buttons for varuis colors 
    -when a button is pressed it send an http request indicating which button 
    is pressed
    -the server handler sends the first letter of the color by UART1
'''

import socket
from server import setHandler , serve, runServer, setResourceFolder
from machine import UART

uart = UART(1)                                      

def testServer(_, object):
    uart.write(object["button"][0])
    print(object)

addr = socket.getaddrinfo("0.0.0.0",8080)[0][-1]

setHandler({"/" : [serve,"web.html"]})            
setHandler({"connect" : [serve,"connect.html"]})
setHandler({"test" : [testServer,1]})

setResourceFolder("/src")
runServer()
mgtm98 commented 4 years ago

@alranel Is it fine to implement new libraries (ROS lib.) in upython or should i stick with the existing ones and write example with them? Is there an available upython build for Portenta or It's not available yet? finally... I sent a mail but didn't get an answer soo kindly can u check itπŸ˜…πŸ˜…

mgtm98 commented 4 years ago

@alranel

alranel commented 4 years ago

Hello @mgtm98, congrats for your work! It is totally fine (and very welcome!) to implement new libraries. The MicroPython build for Portenta will be released in the next weeks. Let's communicate in this issue rather than e-mail :-) Thank you!