arduino / summer-of-code

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

GSoC 2020 - Examples for Libraries #82

Closed AsherThomasBabu closed 4 years ago

AsherThomasBabu commented 4 years ago

I am Asher Thomas Babu, a 2nd-year Electronics and Communication Engineering Undergraduate student at the College of Engineering Chengannur, Kerala, India. It gives me great joy to see that my Favourite Development Board is part of the Google Summer of Code 2020. I have been working with the Arduino on various projects based on it for nearly 4 years now and have acquired a great taste in curating programs and documenting hardware projects.

Background My first steps into the world of electronics and programming were through the Arduino and it wasn't an easy neither interesting one, basically because of the fact that I didn't have any basics in programming. But the taste of success after a lot of hard work scouring the internet on basic and easy to understand programming tutorials was very sweet.

A bright blinking LED would be a lot more relatable and interesting to a first-timer rather than a sequence of numbers printed on a screen. From personal experience, I would have learned to program a lot quicker if I had a more tangible experience along with a structured readable guide. I understand that there are various tutorials available as of now, but what I have understood is that all of these are focused around teaching how to use the Arduino rather than teaching how to program.

My Idea Proposal Major boards like the Raspberry Pi are headed towards making the process of learning easier and more accessible for young budding programmers. With the widespread popularity and cheap availability of the powerful Arduino development boards and various I/O modules, I propose that the Arduino coupled with a well-planned curriculum can become the best platform to teach programming in a wonderfully interactive and interesting way. Libraries and examples can be created in order to make simpler functions along with specifically designed modular kits that can interface I/O devices to make programming fun and interesting.

Curating a well-structured guidebook and also even a chat-bot in addition to the above-mentioned libraries and examples for the purpose of teaching programming seems like a very interesting and necessary idea to me.

I would like to receive feedback and mentorship on the viability of this idea and also possible changes. Looking forward to working with you soon.

AsherThomasBabu commented 4 years ago

Referenced below are some of the many pull requests I plan on making to the Library Examples

  1. https://github.com/arduino-libraries/Mouse/pull/13#issue-387588776
  2. https://github.com/arduino-libraries/Mouse/pull/12#issue-387588351
  3. https://github.com/arduino-libraries/LiquidCrystal/pull/29#issue-387586645
AsherThomasBabu commented 4 years ago

Hey, @alranel I'd appreciate it if you could give me some guidance on this. Thanks

alranel commented 4 years ago

Welcome @AsherThomasBabu, and thank you for your introduction and your contributions. Your idea is ambitious, but probably is more suited for the Season of Docs istead of the Summer of Code, which is more focused on programming. I'd suggest to focus more on writing code, so you may want to think about some advanced example that involves libraries and maybe a physical prototype.

AsherThomasBabu commented 4 years ago

Thank you sir, @alranel for the reply, I have in fact curated a proposal and submitted it at the GSoC Dashboard for review. I Have included plans for various examples that could be created. @per1234 @masci please do look at the proposal and leave feedback, It'll help me shape the proposal better. Thank You Asher

AsherThomasBabu commented 4 years ago

@per1234 Sir, I'm not sure if you noticed my previous message, being a reviewer for @arduino-libraries I think you'd know best about the needs of the current libraries. I have linked my proposal in .md HERE. Kindly review it and guide me on how I could make it better. Thanking you in advance Asher

AsherThomasBabu commented 4 years ago

@per1234 Requesting feedback

Proposal - Arduino GSoC 2020 - Write Examples for Official Libraries

Abstract

Example sketches play a very important role in helping a developer understand the functionality and functions available in a specific library. Personally, the first thing I would refer to while working with a library is the available examples.

Maintaining an updated and rich collection of easy to understand example sketches is the need of the hour.

The project that I have chosen to propose and pursue under the mentors at Arduino for Google Summer of Code 2020 is briefed in the following paragraphs

Housing about 90 Repositories, very few Libraries are well furnished with examples even though with issues. Most libraries like the Education Shield,Scheduler, Keyboard, Mouse have not been updated since their inception.

There are also inconsistencies in the availability of Examples in the Repos i.e Examples available to the IDE user may not be available to the ProIDE or Cli users because of their absence in the GitHub Repos.

Fixing these inconsistencies along with adding examples and project documentation for existing and new examples for easier understanding of these libraries shall be my main motive during the mentorship period.

Technical Details

Libraries are plenty but the available examples are nowhere close to what is acceptable and understandable to beginners, from my research during the period after which Arduino was declared as an organization for GSoC, Here are the details of the projects that I would work on for the Summer.

Library Examples

Sl.No

Library

Example

Description

1. Servo JoyStickControl Using a joystick module to control the motion of 2 servos, intended to give basics of the Servo Library and also interfacing the joystick module.
SerialControl Knowing and understanding the SerialInput capability of an Arduino is necessary, Along with that this program aims at letting the user know the position of the servo and also change positions by entering values into the serial monitor.
ProgrammedMotion Using a potentiometer to record its motion and play it back via the servo using a button.
2. MKRTHERM ReadSensorImperial The Library Lacks an Imperial Unit Read Example. Adding this example will allow for readings in Fahrenheit.
3. Audio/AudioZero SimpleMusicPlayer Using 3 buttons as an interface to the Arduino, any music stored as .wav on an SD card can be read and played with an Arduino.
Record Function Currently the library features only a playback feature. The functionality of the board can be further improved by adding a record function to the
4. Keyboard KeyboardMacro Perform a pre-programmed set of keyboard instructions on the press of a single Arduino button.
HelloWorld Basic Program to understand the working of the keyboard library
KeyboardReprogram, KeyboardSerial, KeyboardLogout, KeyboardMessage,KeyboardAndMouseControl Add the remaining examples from Arduino.cc along with all the documentation and schematics.
5. Mouse MouseMacro Perform a pre-programmed set of instructions at the single press of an external button.
KeyboardAndMouseControl,

ButtonMouseControl,

JoystickMouseControl

Add the remaining examples from Arduino.cc along with all the documentation and schematics.
AccelerometerMouse Uses an accelerometer to detect tilts and converts that into mouse movements on the computer.
6. ArduinoBLE ConnectionStatusLED Using the connected() function of the ArduinoBLE Library to let beginners know the basics of how to connect to a BLE device and light up an LED on establishing a proper connection.
7. MKRNB LedControl MKRNB library lacks simple examples to help beginners understand the module. This Example will allow an LED to be controlled via an SMS.
8. CapacitiveSensor CapacitiveButton Creating a simple Sketch along with schematics to control a simple LED using a Capacitive Button.
9. CRC32 CRCHelloWorld CRC is not a very easy concept for beginners, This will be a simple sketch that will allow them to learn the concept of CRC.
10. Stepper SerialInput A sketch that will allow the users to control the stepper motor by using the keyboard to input step count and arrow keys to give serial input.
11. Scheduler MultiIO A Simple sketch to show the capability of this rather infamous library by integrating hardware for Simultaneous Inputs and Outputs.

Note: All these are just my understanding of the needs of the repositories, I will be open to discussion with the mentors to curate a more fitting set of examples if needed.

Example Projects for Arduino HUB

Projects will help understand the function of a library better, HUB provides a really great platform for this purpose. I intend to make and document projects that are based on these examples that I have proposed above subjective to the availability of components. All of which will aid the user to understand the usage of the libraries and their functions better.

The main projects that I would like to work on are:

Simple Arduino Music Player with LCD Display and Capacitive Buttons

DETAILS(Schematic,Code snippets) YET TO BE ADDED

Accelerometer Mouse

Schedule of Deliverables

Community Bonding Period

My objective for the Community Bonding Period will be to initially get off on the right foot with my mentor and get to understand the needs of the Organization during the aforesaid period of time.

Keeping my proposal in mind, I will work with the mentors to create a more refined and better plan for the coding period.

Also, during this period I will try to work with the mentors to solve and fix issues that arise in the community to the best of my abilities in order to better understand the style of documentation and the structure of Examples that I have to maintain.

And as mentioned in the Guide to the proposal, I will get hands-on experience of the Arduino and the modules that I plan to use.

Phase 1

Phase 2

Phase 3

Final Week

All the above-mentioned code shall be completed along with documentation and will be pushed to the public repository. Decided upon projects shall be documented and uploaded to Arduino Project Hub.

Development Experience

I am Asher Thomas Babu, an enthusiastic developer pursuing Electronics and Communications Engineering from India.

GitHub - @AsherThomasBabu

I Have been contributing to the open-source society for the past two years, I happened to be a part of the HacktoberFest for the past two years.

I have also been contributing to the Arduino community for about a month and below mentioned are some of my contributions to the Arduino Community.

  1. arduino-libraries/SD#75 (Merged) Fixed a card corruption issue with the example in SD Library
  2. arduino-libraries/AudioZero#8 (Merged) Corrected a Markdown error in a readme file.
  3. arduino-libraries/Mouse#13 (Approved) Added an example to the Mouse Library
  4. arduino-libraries/AudioZero#9 Fixed an issue that caused deteriorating quality on the repeated playing of an audio file.
  5. arduino-libraries/Keyboard#31 Added a HelloWorld Example to the Keyboard Library
  6. arduino-libraries/CapacitiveSensor#3 (Approved) Fixing an inconsistency in the markdown of the readme file.
  7. arduino-libraries/Servo#41 Added an example for the Servo Library.

Apart from that

  1. I was also the part of @UnoPlatform and @Magneto
  2. I also contributed to @Kong during the Hacktober month.

I was also the lead on the team that built IoT enabled sanitary pad vending machines based on the ESP8266.

I built a CNC Writing machine Based on the Arduino GRBL Library, it is also documented at Instructables at the following link.

https://www.instructables.com/id/DIY-CNC-Writing-Machine-Using-GRBL/

I Have been working on Arduino based projects for more than 3 years now, I Have also led and attended numerous workshops co-organized by me at my college as part of the IEEE.

Why this project?

Every time I choose to work on a new module, or a library, the first thing that I often consult is the examples and the documentation. I chose to work with this organization and this project only because of the reason that I love the Arduino Community and wanted to give to the community what it had given me. I learned about Arduino being part of the Google Summer of Code and I immediately set out to understand the codebase and the needs.

Having the required skill set and exposure towards the necessary tools, I was sure I could attempt to cater to the needs of Arduino through this project. Also having written quite a good amount of code for various projects in school and college and also having experience in documenting projects, I decided that this project was the best fit for me and I haven’t turned on that decision ever since.

Do you have any other commitments during the GSoC period?

During the GSoC Period, I do not have any other commitments. Due to the dilemmatic state of the pandemic, classes might be pushed a little into summer. I still can manage to do 30 hours of work every week.

My working hours on weekdays will be :

6:00 - 8:00 AM ; 12:00 - 1:00 PM ; 6:00 - 11:00PM

Except on Sundays where it will be :

2:00 - 11:00 PM

AsherThomasBabu commented 4 years ago

@per1234 is writing examples to the core library at https://github.com/arduino/Arduino/tree/master/build/shared/examples open as a part of GSoC?

AsherThomasBabu commented 4 years ago

I have submitted my proposal! Looking forwards to working with the mentors at @arduino this summer.

AsherThomasBabu commented 4 years ago

Thank you @alranel and @per1234 for the support throughout! I have learned quite a lot. Hoping to remain associated with the community!