Lazarus
Free Pascal => Beginners => Topic started by: jb007 on March 10, 2016, 09:31:01 am
-
Hi,
just a very easy question, no details needed:
Can I use FreePascal to programm and upload to an Arduino?
( as embedded software without an OS )
If not, annyone got a good suggestion? I googled around but I don't get it...
I only know TurboPascal and it's too much for me to learn a C language.
See her some projects ( done in Turbo Pascal ),cnc and robot-arm:
https://www.youtube.com/channel/UCGdece-f-TRRRMBFn51fk-g
Tnx in advance!
-
Question should be:
Can I use Lazarus/FreePascal?
-
Hi,
I think there is FreePascal for AVR in trunk.
-
Tnx. I will check that this evening.
Got some diagram.
Current SetUp and "NEW Setup" with Arduino:
-
Can I use FreePascal to programm and upload to an Arduino?
Have you tried to search forum?
http://forum.lazarus.freepascal.org/index.php/topic,31513.msg202960.html#msg202960
http://forum.lazarus.freepascal.org/index.php/topic,30960.0.html
http://forum.lazarus.freepascal.org/index.php/topic,29128.msg183767.html#msg183767
http://forum.lazarus.freepascal.org/index.php/topic,12219.msg90805.html#msg90805
-
Insteand of Aurdino, you can use ARM board with Linux RT kernel.
-
Hi, tnx!
Yes, did search the forum but I didn't get a clear overview for myself. So much information.
@mig-31
If I have to step to ARM-board with Linux RT kernel, it would be easier for me to step over to R- PI.
Gonna try the Mikropascal limited free version.
The programm in the Arduino has to do the following.
- 10 times a second: Arduino ADC's reading analog joysticks and send it to pc.
- 10 times a second: pc send commands to Arduino for eacht steppermotor.
PC does the complete robot kinematics etc. The Arduino only has to send the DirectionSignal and Step-Pulses to the StepperMotorDrivers.
I ques my programm HEX-file for Arduino will not reach the 4kb free version MikroPascal
-
PC does the complete robot kinematics etc. The Arduino only has to send the DirectionSignal and Step-Pulses to the StepperMotorDrivers.
I ques my programm HEX-file for Arduino will not reach the 4kb free version MikroPascal
Maybe. If you do not need acceleration/decceleration ramps.
-
Hi,
you got it right Avra!
Got a begin in programming mikroPascal-AVR.
Can read the analog joysticks and "display" them on some LED bar-graphs.
( for test and learn this is very nice )
Also startded using Lazarus. have some experience in Delphi, but Lazarus looks ok.
Most important step now is to create a serial conenction between PC(Lazarus) and Arduino(mikroPascal-AVR).
-
Got problem:
Only get following when compiling etc, even after "clean up and rebuild":
Googled and searched this forum bu I don't get a clue...
Anybody can help me?
Tnx.
-
Please, can anyone help me?
Thanks in advance!
-
Most important step now is to create a serial conenction between PC(Lazarus) and Arduino(mikroPascal-AVR)....
Well, here:
https://github.com/jmpessoa/lazarduinomodulewizard
there are: LamwinoDemo3 and LamwinoDemo4 and a pure free pascal unit "lamwinoavrserial.pas" in "....\templates"
may be useful for you....
-
Hi, tnx, jmpessoa.
Firts thing I got to solve is to get a programma run/complied/build at all in Lazarus.
With or without serial comm or whatever.
Just resently installed and started with Lazarus but I don't get a programm run.
Only get following when compiling etc, even after "clean up and rebuild":
Googled and searched this forum bu I don't get a clue...
-
Tonight 'm gonna try to install complete Lazarus over again and check all the instal settings and see if anything will run.
-
Installed again, it works.
-
read this http://forum.lazarus.freepascal.org/index.php/topic,30960.msg206256/topicseen.html
-
After a break, got some significant progress!
Value of 3 ScrollBars is sended by RS232 to my Arduino.
At 3 LedBars, the values are displayed as (0-255) values.
( gonna be in 0 to 8 led's later as is it showing an audio-level-indicater )
In Lazarus the refresh rate is 10/sec. Only the value of the last changed Scrollbar is sended to Arduino. At my Lazarus INIT al of the 3 wil be sended!
-
I'm using
1 byte as LedbarNumber and
3 bytes as LedBarValue.
The string 'el' (end-line) is added as delimiter.
I'm very happy I got this far programming RS232.
Next step is to controll my robotArm by PC-RS232-Arduino!
Fortunately I got the major part for controlling my robotArm allready
coded in TurbuPascal7.0 and the control is done by ISA/ 82c55a.
The whole ForWard/BackWard-Kinematics, stepperControl and overal mathematics for Interpolation/Integral/Differential for creating a path in 3d.
http://europakade.nl/motion-control-an-robots/robot-arm
https://www.youtube.com/playlist?list=PL7iWs5bvJdxs91kCZUV9P6KuG4mvriLgJ
-
Hi,
allready some time ago but I wanted this tho share with you:
For programming my Arduino's, I'm using mikroPascal for AVR.
On my pc: got Lazarus running very smooth!
On my raspberry PI's: got Lazarus running and did some first tests.
Kind regards.