Arduino lazarus / 61-Beginners ---------------------------------------------------------------------- jb007 · 2016-03-10 08:31 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! ---------------------------------------------------------------------- jb007 · 2016-03-10 08:37 Question should be: Can I use Lazarus/FreePascal? ---------------------------------------------------------------------- mig-31 · 2016-03-10 09:04 Hi, I think there is FreePascal for AVR in trunk. ---------------------------------------------------------------------- jb007 · 2016-03-10 09:27 Tnx. I will check that this evening. Got some diagram. Current SetUp and "NEW Setup" with Arduino: ---------------------------------------------------------------------- avra · 2016-03-10 11:17 Quote from: jb007 on March 10, 2016, 09:31:01 amCan 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.ht ml#msg202960 http://forum.lazarus.freepascal.org/index.php/topic,30960.0.html http://forum.lazarus.freepascal.org/index.php/topic,29128.msg183767.ht ml#msg183767 http://forum.lazarus.freepascal.org/index.php/topic,12219.msg90805.htm l#msg90805 ---------------------------------------------------------------------- mig-31 · 2016-03-10 13:48 Insteand of Aurdino, you can use ARM board with Linux RT kernel. ---------------------------------------------------------------------- jb007 · 2016-03-10 17:37 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 ---------------------------------------------------------------------- avra · 2016-03-13 21:26 Quote from: jb007 on March 10, 2016, 06:37:00 pmPC 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 MikroPascalMaybe. If you do not need acceleration/decceleration ramps. ---------------------------------------------------------------------- jb007 · 2016-03-16 17:51 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). ---------------------------------------------------------------------- jb007 · 2016-03-17 09:57 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. ---------------------------------------------------------------------- jb007 · 2016-03-20 12:53 Please, can anyone help me? Thanks in advance! ---------------------------------------------------------------------- jmpessoa · 2016-03-20 16:46 QuoteMost 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.... ---------------------------------------------------------------------- jb007 · 2016-03-20 20:13 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... ---------------------------------------------------------------------- jb007 · 2016-03-21 10:11 Tonight 'm gonna try to install complete Lazarus over again and check all the instal settings and see if anything will run. ---------------------------------------------------------------------- jb007 · 2016-03-24 08:33 Installed again, it works. ---------------------------------------------------------------------- herux · 2016-03-24 09:26 read this http://forum.lazarus.freepascal.org/index.php/topic,30960.ms g206256/topicseen.html ---------------------------------------------------------------------- jb007 · 2016-08-08 20:07 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! ---------------------------------------------------------------------- jb007 · 2016-08-08 20:07 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=PL7iWs5bvJdxs91kCZUV9P6KuG4mvriL gJ ---------------------------------------------------------------------- jb007 · 2017-08-25 17:14 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.