Forum > Embedded - AVR

Creating new component for Arduino

(1/2) > >>

Arminius:
Hello Lazarus community,

I haven't been here for a while and I'm happy to see Lazarus is still up and kicking!

Through quadcopters and swarm robotics, there has been a renewed interest in programmable robotics and I have been trying to find any Lazarus related components for different sensors (accelerometers, compass, gyroscope,...) and actuators (mainly the motors/their control board). Despite some messages here and there I have found no structured, easy to use components or tutorials.

I'm interested into getting something structured out there (in case I have missed nothing). Anyone with hardware experience interested in joining in?


Additionnal question: why are all the examples I saw using serial ports instead of USB. What advantages/disadvantages?

eny:

--- Quote from: Arminius on July 21, 2015, 07:13:29 pm ---Additionnal question: why are all the examples I saw using serial ports instead of USB. What advantages/disadvantages?

--- End quote ---
Working with serial ports is much easier than with USB at both the uController and PC side.
And many/must uControllers support serial communication.

Arminius:
Thank you for this information!

avra:

--- Quote from: Arminius on July 21, 2015, 07:13:29 pm ---Through quadcopters and swarm robotics, there has been a renewed interest in programmable robotics and I have been trying to find any Lazarus related components for different sensors (accelerometers, compass, gyroscope,...) and actuators (mainly the motors/their control board).
--- End quote ---
Original Arduino IDE uses GCC to produce code for 8-bit Atmel AVR and some ARM processors. Lazarus IDE uses FreePascal to produce code for various targets.  I guess that you are probably most interested in ARM embedded and ARM Linux targets. ARM embedded is possible but not very user friendly. ARM Linux is well supported and there are ready to use libraries for Raspberry Pi platform. More info can be found here: http://wiki.freepascal.org/Lazarus_on_Raspberry_Pi.

Arduino platform was microcontroller hardware oriented from the start - that's why there are so many ready to use libraries to talk to various hardware chips (through GPIO, I2C, SPI, 1wire, serial...). For each library someone had to read sometimes hundreds of pages from datasheet of some chip and code a wrapper which is not easy and usually needs and engineer or an advanced user. Lazarus was pc oriented from the start and does not have such strong hardware background, and there are not many Lazarus people who know how to interprete datasheet data to make a usable library. Therefore you will not find many libraries for some specific chips, but nothings stops you from converting other's people code (including Arduino) if you know what you are doing, or read datasheets yourself and use GPIO, I2C, SPI and other ways to talk to your device (step motor, servo motor, gyro, compass, temperature or any other type of sensor...).

If you want to use Pascal with a lot of included ready to use hardware drivers like you can find for Arduino, then take a look at E-Lab AvrCo Multitasking Pascal for Atmel AVR Tiny/Mega/XMega microcontrollers, or Mikroelektronika Pascal (also for Atmel, but supports PIC, ARM, 8051 and FT90x):
http://www.e-lab.de/AVRco/index_en.html
http://www.mikroe.com/mikropascal

Paul Breneman:
Arminius, there are related links on this wiki page: http://wiki.freepascal.org/Portal:Hardware_and_Robotics

I'm hoping to make ARM Embedded much easier for the Teensy, and this wiki page is where things are right now: http://wiki.freepascal.org/Small_Virtual_Machines

Navigation

[0] Message Index

[#] Next page

Go to full version