BeagleBoard/GSoC/2019Proposal/makecode-target-beaglebone

From eLinux.org
Jump to: navigation, search


Makecode Target for Beaglebone

PXT Beaglebone Target
  • Add support for Beaglebone Boards in the Makecode Maker target
  • modify the target support to act as an interactive platform for sharing projects
  • Add PocketBeagle Techlab Cape Support to the target
  • Port the compatible projects from Beagleboard Projects to pxt-based interactive project sharing mechanism and port the existing compatible bone101 tutorials to Makecode tutorials.

Student: Vaishnav M A
Mentors: Jason Kridner
Code: https://github.com/vaishnav98/pxt-beaglebone
https://github.com/Microsoft/pxt-maker
Wiki: https://elinux.org/BeagleBoard/GSoC/2019Proposal/makecode-target-beaglebone
GSoC: Not Yet Submitted

Status

This project aims to add support for Beaglebone Boards in the existing Makecode Maker Target , which has bread boarding capabilities and browser based simulator. As a first step I have forked the Maker Repo and created a separate makecode target based on the BoneScript RPC Server which is able to interact with the Beaglebone Boards(Beaglebone Black, Beaglebone Green, PocketBeagle). The live simulator is available here I have made a few test/demonstration videos here :

1) Basic Introduction video, User LED Blink (https://www.youtube.com/watch?v=niSkdlEI5UE)
2) DigitalRead : Slide Switch Input (https://www.youtube.com/watch?v=n2EkLOWMtDc)
3) AnalogRead, AnalogWrite, ServoWrite, console/graph, textfile functions, changing boards etc. (https://www.youtube.com/watch?v=5YAto5vOWnA)

Proposal

The Hello World Application was Cross-Compiled(and tested using QEMU Emulator) and Pull Request #127 was generated.

About me

IRC: vaishnav98_ || vaishnav98
Github: vaishnav98
School: College of Engineering,Trivandrum under Kerala Technological University
Country: India
Primary language : English
Typical work hours : 11 AM-6:30 PM GMT (3:30 PM to 10:30 PM Indian Standard Time)
Can also switch to 3 AM-10:30 AM GMT (7:30 AM to 3:00 PM Indian Standard Time)
Software Skills : JavaScript,C,C++,Linux,Python,UI Design,PCB Design,HTML/CSS Hardware Skills : Circuit Prototyping and Soldering,HomeBrewing PCBs. Previous GSoC participation: I am very much interested to work on this project so that I can contribute to the BeagleBoard Community while improving my skills and experiences. I had successfully completed the project: Fixing Bugs in BoneScript and Improve BeagleBone UI during GSoC 2018

About my project

Project name : Makecode Target for Beaglebone

Description

Makecode is a framework for creating special-purpose programming experiences for beginners, especially focused on computer science education. Makecode has a blockly based programming environment served on the browser along with an in-browser board simulator. The goal of this project is to make a Makecode target for the Beaglebone boards with Breadboard simulator capability similar to Makecode maker which can interact with hardware making use of the bonescript RPC Server, the final goal of this project is to incorporate the Beaglebone support with the Makecode Maker target. The development of a Makecode support for Beaglebone boards will lower the bar of entry to the world of embedded systems programming with Beaglebone Boards. The Makecode project also has an attractive interface through which projects can be shared, tutorials can be made and trying out the different beaglebone boards directly from the browser simulator.

Overview

The primary aim of this project is to add support for Beaglebone boards in the Makecode Maker Target. Microsoft MakeCode is based on the open source project Microsoft Programming Experience Toolkit (PXT) which is a framework for creating JavaScript/Blocks online editors. The Makecode editor along with its blocks based programming and Markdown based documentation system that can render blocks will definitely help beginner users to get started with the peripherals on beaglebone. The interactive documentation system([ https://maker.makecode.com/about example]) will act as a better method to create and share tutorials.The project scope also includes the development of a PXT Robotics based extension/library which will help perform automation and control tasks through blockly.

Timeline

I am planning to work on integrating the existing functions to the PXT Maker target and then continue with further development on the Makecode Simulator, after adding support for all basic features for the makecode target, I will continue with adding support for Techlab cape and then work on migrating the tutorials and projects. I understand that this project will require a lot of feedback from the community and modifications based on community feedback, so I will make sure to spend enough time to interact with the community for getting feedback and feature suggestions.

Prior to Coding Period

I will use this time to get more users to test the existing target and get input from the community regarding issues to be solved and feature additions to be added. I will also make use of this time to go through the PXT-Maker sources and try to plan the methods to integrate the existing support to the Makecode Maker Target.

Community Bonding Period: May 6 - May 26

  • Prepare the introduction video and start a blog to document the project progress.
  • initiate discussions in the pxt discord community regarding the project
  • Start discussions in the community channels and ask feedback/suggestions about the project
  • Make changes to some of the goals according to mentors’ opinion
  • Fix timings for periodic meeting with mentors
  • Discuss about Documentation Guidelines to be Followed

Week 1: May 27 - June 2

  • Work on integrating the beaglebone black support with the Makecode Maker Target
  • Work on adding the basic bonescript based functions: pinMode,digitalWrite,digitalRead,analogRead,analogWrite to the Makecode Maker Target

Week 2: June 3 - June 10

  • Work on adding the board support for PocketBeagle board
  • add support for Beaglebone Green
  • Test out the existing work and ask for community feedback

Week 3: April 11 - June 17

  • Add support for advanced functions like attachInterrupt,getPinmode,shiftOut
  • Write PXT library/module for Textfile functions: ReadTextfile and WriteTextfile

Week 4: June 17 - June 24

  • Testing out the support for Beaglebone Black and PocketBeagle
  • Adding support for Beaglebone Green Board
  • Prepare test/demonstration videos for added support

At the end of Phase I, I will be able to deliver: support for Beaglebone Black, Beaglebone Green and PocketBeagle in the Makecode Maker Target with demonstration videos and example tutorials

Week 5: June 25 - July 01

  • Add support for Accelerometer based response in simulator (pre-requisite while adding support for Techlab cape)
  • Add support for Basic Features of Techlab Cape
  • Add support for Music functions (pre-requisite while adding support for Techlab cape)

Week 6: July 01 - July 08

  • add support for 7 Segment LEDs and buzzer in Techlab Cape
  • Add support for accelerometer based response in the simulator for Techlab Cape

Week 7: June 09 - July 16

  • Test out the Techlab Cape functions and create tutorials and examples for the same
  • Add basic support for Beaglebone Blue board

Week 8: July 16 - July 22

  • prepare test/demonstration videos for Techlab cape support and Beaglebone Blue support
  • Testing and documenting the work done until now and fixing any issues
  • ask for community feedback for finished work and make suggested changes

By the end of Phase II, I will be able to Deliver PocketBeagle Techlab Cape and Beaglebone Blue Support along with proper documentation

Week 9: July 23 - July 29

  • add support for Motors on the Beaglebone Blue
  • add support for IMU and pressure sensor on the Beaglebone Blue

Week 10: July 30 - Aug 6

  • start with the development of a Makecode add-on library for Robotics and automation similar to : https://github.com/Microsoft/pxt-automation
  • Provide examples for the added library and make demonstration videos
  • Provide documentation for writing new libraries for the target and adding new boards/parts

Week 11 and 12: Aug 7 - Aug 23

  • these two weeks are reserved as buffer time for finishing pending work from previous weeks
  • port some of the compatible existing projects and tutorials to the Makecode Platform
  • Improve the Work until now as per feedback from mentors and community
  • Prepare final documentation/Wiki for the project
  • Prepare the final video

Experience and approach

I am a Third year undergraduate pursuing Electronics and Communication Engineering, I have enough experience working with BeagleBone and other Embedded Linux based boards. I have successfully completed GSoC 2018 under Beagleboard.org Foundation: Fixing Bugs in BoneScript and Improve BeagleBone UI

I have also some experience in Web development and working with Node.js which will be useful for the project. I have tried to create a draft version of the Makecode target available at pxt-beaglebone Live Simulator Makecode Beaglebone a Makecode Blocks editor for Beaglebone Boards

My Works(all uploaded on my Github Repository):

Contingency

If I get stuck and if my mentor isn’t around , I’ll try to search the internet for similar issues and try to solve the particular issue that cannot be solved with my knowledge, so even if my mentors are not available for a short period of time, it won't much affect the quality of my work, If I am not able to find the solution to a problem by searching, going through forums, IRC, PXT Discord community and mailing lists, I will try to proceed my work by focussing on documenting the finished work and creating demonstration videos.

Approach

I don't have any other commitments during my vacation, so I can devote about 7-9 hours a day, i.e. around 50 hours a week to achieve my milestones. I am willing to spend more time if I am not able achieve any of the targets set by me.

Benefit

Makecode is a framework for creating special-purpose programming experiences for beginners and has a blockly based programming environment served on the browser along with an in-browser board simulator. The development of a Makecode support for Beaglebone boards will lower the bar of entry to the world of embedded systems programming with Beaglebone Boards. The Makecode project also has an attractive interface through which projects can be shared, tutorials can be made and trying out the different beaglebone boards directly from the browser simulator.


Some of comments mentioning the importance of this project are given below:
Mentor Jason Kridner

The videos already show great progress ,I'd like to think about how various Click modules could be added to TechLab, but that may depend on the Greybus project idea.


Peli De Halleux, Working on Makecode at Microsoft

The editor looks super cute :)
Yes we love to see beaglebone support in maker.makecode.com . The best way to go forward is to prepare pull requests for the required changes. At first, you can mark the beaglebone boards as "- beta" until the integration is tested.Thank you for your work!