arduino / summer-of-code

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

Write Examples for official Libraries - Practical Approach #98

Closed Inv3nt0r1 closed 3 years ago

Inv3nt0r1 commented 4 years ago

Idea - Writing Examples for Official Libraries

Hello,

My name is Durgesh Pachghare, a Computer Engineering Undergraduate from India. Arduino was the thing from which I started my learning and experiments in Robotics. I have 5 years of experience working with various Arduino boards, a large variety of sensors and actuators. I lead the robotics club in my college and I am a Technical Lead of Robotics Teams which makes complex robots for various robotics competitions. I have proficiency in Arduino, C, C++, and Java Programming Languages.

Motivation

Arduino is a member of my daily experiments. I learned Arduino completely from the examples of Libraries present in the IDE and using that I used to write my own programs and try it. After practicing, I was able to write advance level code with Arduino integrating multiple sensors, actuators, and various devices. Examples play a very important role in learning Arduino and trying new things. So, I want to make contributions that will be really helpful for the entire community of makers.

Practical Approach

My approach aims at providing many examples and examples integrating multiple components. Many projects require integration of multiple components, so if we give examples in that approach, more people will understand and will try given examples and learn more. A detailed explanation will be in the Proposal.

I will update this thread once I submit my draft.

Thank you. Regards, Durgesh.

Inv3nt0r1 commented 4 years ago

Sample PRs Submitted: https://github.com/arduino-libraries/Arduino_LSM9DS1/pull/8 https://github.com/arduino-libraries/Servo/pull/43

alranel commented 4 years ago

Welcome @Inv3nt0r1. Make sure you read the application guide in this repository which explains how to write a good project proposal.

Inv3nt0r1 commented 4 years ago

Thank you so much for the reply. I am working on Proposal, I will submit it for review tomorrow. I am ensuring it to be as detailed as possible.

Inv3nt0r1 commented 4 years ago

Hello @alranel @per1234, I have submitted my draft on the GSOC portal. Kindly review it and tell me changes/suggestions/additions if any. Thank you.

Inv3nt0r1 commented 4 years ago

Is there any specific reason why the Arduino IDE has more examples than the actual library Repo?

@per1234

per1234 commented 4 years ago

Would you mind providing some more details @Inv3nt0r1. Which library repo are you referring to? What is the exact menu path in the Arduino IDE where you are seeing the additional examples?

Inv3nt0r1 commented 4 years ago

I apologize for not giving full details.

For example, Keyboard Library have only 1 example in Github Repository i.e. Seria.ino.

But in IDE, under File > Examples > USB > Keyboard, there are 4 examples listed namely

Also, the reference link of Keyboard Library has a description of all the examples listed in IDE.

Same is with Mouse Library which does not contain any example at all in Github Repo, but it got 2 examples in the same path in Arduino IDE.

per1234 commented 4 years ago

Those examples are bundled with the Arduino IDE: https://github.com/arduino/Arduino/tree/master/build/shared/examples/09.USB

I think the reason is because years ago the Keyboard and Mouse libraries were part of the core library. When they were made into separate libraries, the examples were left in their original location.

There are proposals to move those examples to the library repositories:

Inv3nt0r1 commented 4 years ago

Those examples are bundled with the Arduino IDE: https://github.com/arduino/Arduino/tree/master/build/shared/examples/09.USB

I think the reason is because years ago the Keyboard and Mouse libraries were part of the core library. When they were made into separate libraries, the examples were left in their original location.

There are proposals to move those examples to the library repositories:

Okay, got it. Thank you so much for your reply.