Regarding developing Arduino compatiable starterware for BeagleBone

Dear all,

I am an undergraduate student in electronics and telecommunication and I would like to participate in developing arduino like library for beagleboard.
I have worked on beagleBone with python, C and C++. I think I can contribute to this project.
Here are some of libraries we can create.

  1. Arduino like GPIO library, and ADC, PWM library
  2. DC Motor Controlling library
  3. Servo Motor controlling library
  4. Stepper Motor Controlling library
  5. Serial communication library
  6. SPI library
  7. CAN library
  8. Ethernet library
  9. USB library
  10. Various sensor integration libraries (Gyroscopes, Accelerometers, etc)
  11. Other libraries for integration bone capes
  12. Camera integration libraries
  13. OpenCV wrapper library for make it more easy to starters.
    Since Beagle is more powerful than Arduino I think we can create libraries for more powerful task such as image processing, and text to speech etc.
    Any ideas ?
    Thanks.

Dear all,

I am an undergraduate student in electronics and telecommunication and I would like to participate in developing arduino like library for beagleboard.
I have worked on beagleBone with python, C and C++. I think I can contribute to this project.
Here are some of libraries we can create.

  1. Arduino like GPIO library, and ADC, PWM library
  2. DC Motor Controlling library
  3. Servo Motor controlling library
  4. Stepper Motor Controlling library
  5. Serial communication library
  6. SPI library
  7. CAN library
  8. Ethernet library
  9. USB library
  10. Various sensor integration libraries (Gyroscopes, Accelerometers, etc)
  11. Other libraries for integration bone capes
  12. Camera integration libraries
  13. OpenCV wrapper library for make it more easy to starters.

Since Beagle is more powerful than Arduino I think we can create libraries for more powerful task such as image processing, and text to speech etc.
Any ideas ?

Can you break down each of those tasks a bit and say how you would implement them? I have doubts you have given serious thought to what work can be completed in the time allowed.

Dear Jason Kridner,

Thanks for your reply.

Yes it is a challenging task to implement all of them within time line of GSoC.

But I think We can implement most of them.

  1. I think most fundamental thing is , develop GPIO library since it is the key thing to most of other things like sensor integration and motor controlling.

To this I think developing proper data structures is the key thing, so that we can integrate fundamental data structures to other libraries also.

And we can study about architecture of bonescript and arduino core library to implement this.

Under GPIO library we can create analog input (ADC) and PWM output.

  1. After implementing GPIO library controlling of various motors is a easy task which can be written using general digital output and PWM output. We can create Servo motor library using PWM output and DC Motor controlling with PWM and digital output.

And controlling stepper motors is mostly depend on the motor driver and it is also can be achieved using digital output.

  1. Next thing is to create communication libraries of Serial, SPI and I2C. I have worked with Serial communication in BeagleBone

and I used a open source C library to do that. I think there are plenty of resources in internet on these topics for embedded linux and all we have to do is collect those resources and build a powerful API.

  1. Since sensor integration is mostly done via GPIO, Serial, SPI, I2C communication it can be achieved easily after completing those libraries.

  2. Creating CAN library can be done by Serial and SPI, but I think it will take more time to analyze and design it properly.

  3. I think we can create a simple API which uses openCV for integration cameras and some hobby image processing applications.

I also tried to do image processing for this robot

http://www.youtube.com/watch?v=WatBPt3HPeA

using beaglebone rev A6 and I faced some problems on maximum image resolution and maximum fps. I think it is worthy to

create some sort of guide + API to do these things.

These are the my basic idea of crating libraries, I think we could create at least first 4 tasks within GSoC time line.

Please give you suggestions for improvements and correct me if anything wrong.

Thanks again.

Dear Jason Kridner,

Thanks for your reply.

Yes it is a challenging task to implement all of them within time line of GSoC.

But I think We can implement most of them.

  1. I think most fundamental thing is , develop GPIO library since it is the key thing to most of other things like sensor integration and motor controlling.

To this I think developing proper data structures is the key thing, so that we can integrate fundamental data structures to other libraries also.

And we can study about architecture of bonescript and arduino core library to implement this.

Under GPIO library we can create analog input (ADC) and PWM output.

I agree this is an important building block, but analog input and PWM output would not be using the GPIO library, at least not for the ADC pins or pins with PWM hardware capability. I could see creating a soft PWM mode for GPIO-only pins.

Also, before debugging the GPIO functions and implementing digitalRead/digitalWrite using them, I’d like to see the Makefile structure built such that it builds similar to http://eLinux.org/Userspace_Arduino and the base StarterWare functions are compiling cleanly. This will help us make several decisions based on the size of the libraries among other items.

On a side note, I want to make sure you are looking to use the ‘gcc’ compiler and not TI’s C compiler. We want this to be as open as possible.

Another fundamental building block is the loader, since this won’t be based on Linux and you’ll need to load the code at boot time. I believe making the code load from u-boot is reasonable. For initial development, I can see simply editing uEnv.txt to point to the application to load since a more complicated boot process might slow this project down. Perhaps a parallel project could address the bootloading from Arduino or Energia IDEs.

  1. After implementing GPIO library controlling of various motors is a easy task which can be written using general digital output and PWM output. We can create Servo motor library using PWM output and DC Motor controlling with PWM and digital output.

And controlling stepper motors is mostly depend on the motor driver and it is also can be achieved using digital output.

Once analogRead, analogWrite, tone and noTone are implemented, I agree that the Servo module is a nice next step. Just don’t skip over those functions and consider other simple functions that can be implemented ahead of them, such as attachInterrupt.

  1. Next thing is to create communication libraries of Serial, SPI and I2C. I have worked with Serial communication in BeagleBone

and I used a open source C library to do that. I think there are plenty of resources in internet on these topics for embedded linux and all we have to do is collect those resources and build a powerful API.

As a goal for this project, you won’t have Linux available. Building this on Linux was done last year as part of the http://eLinux.org/Userspace_Arduino project. Certainly you could propose to extend that project, but your comments here don’t seem to imply you’ve looked at the status of that project.

I’m not sure if your Serial communication library was implemented without an operating system. I believe the functions within StarterWare should make this easy, however.

  1. Since sensor integration is mostly done via GPIO, Serial, SPI, I2C communication it can be achieved easily after completing those libraries.

Can you be specific about the sensor integration you will propose?

  1. Creating CAN library can be done by Serial and SPI, but I think it will take more time to analyze and design it properly.

The desire is to use the CAN hardware on the chip, not adding an external CAN controller. I’m not aware if StarterWare has a CAN library or if there is any defined library for CAN in the Arduino ecosystem. I think this is a stretch goal and likely out of scope.

  1. I think we can create a simple API which uses openCV for integration cameras and some hobby image processing applications.

I also tried to do image processing for this robot

http://www.youtube.com/watch?v=WatBPt3HPeA

using beaglebone rev A6 and I faced some problems on maximum image resolution and maximum fps. I think it is worthy to

create some sort of guide + API to do these things.

I have to admit, that sounds pretty cool. You’ll need to implement some kind of camera interface first. I’d suggest creating a USB UVC class host driver. I believe that would need to be broken down into a few steps as well. If done right, I believe this could fall into scope, but I think you have a ways to go to convince me you have the skills, even with good mentorship. Can you break it down for me if you believe it belongs in the proposal?

These are the my basic idea of crating libraries, I think we could create at least first 4 tasks within GSoC time line.

Please give you suggestions for improvements and correct me if anything wrong.

I’m OK with you proposing next-steps beyond what you are confident you can deliver. Just be sure to make it very clear what is in-scope and nice-to-have.

Dear Jason,

Thank you very much for your reply. It was really helpful.

As you mentioned we have to build this using gcc.
I downloaded Linaro tool chain for ARM.

And as I got to know Code Composer Studio supports for TI’s compilers.

Please let me know what IDE should I use to do this ?

I refereed the Starterware guides and It would be helpful if you could give me links to some additional guides if there are any,

Thanks again sir.