Recent

Author Topic: Arduino  (Read 9589 times)

jb007

  • Full Member
  • ***
  • Posts: 145
Arduino
« 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!








to DIY or not to DIY

jb007

  • Full Member
  • ***
  • Posts: 145
Re: Arduino
« Reply #1 on: March 10, 2016, 09:37:59 am »
Question should be:

Can I use Lazarus/FreePascal?
to DIY or not to DIY

mig-31

  • Sr. Member
  • ****
  • Posts: 305
Re: Arduino
« Reply #2 on: March 10, 2016, 10:04:06 am »
Hi,

I think there is FreePascal for AVR in trunk.
Lazarus 2.2.6 - OpenSuse Leap 15.4, Mageia 8, CentOS 7

jb007

  • Full Member
  • ***
  • Posts: 145
Re: Arduino
« Reply #3 on: March 10, 2016, 10:27:18 am »
Tnx. I will check that this evening.

Got some diagram.

Current SetUp and "NEW Setup" with Arduino:
to DIY or not to DIY

avra

  • Hero Member
  • *****
  • Posts: 2514
    • Additional info
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

mig-31

  • Sr. Member
  • ****
  • Posts: 305
Re: Arduino
« Reply #5 on: March 10, 2016, 02:48:27 pm »
Insteand of Aurdino, you can use ARM board with Linux RT kernel.
Lazarus 2.2.6 - OpenSuse Leap 15.4, Mageia 8, CentOS 7

jb007

  • Full Member
  • ***
  • Posts: 145
Re: Arduino
« Reply #6 on: March 10, 2016, 06:37:00 pm »
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









to DIY or not to DIY

avra

  • Hero Member
  • *****
  • Posts: 2514
    • Additional info
Re: Arduino
« Reply #7 on: March 13, 2016, 10:26:38 pm »
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.
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

jb007

  • Full Member
  • ***
  • Posts: 145
Re: Arduino
« Reply #8 on: March 16, 2016, 06:51:52 pm »
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).
to DIY or not to DIY

jb007

  • Full Member
  • ***
  • Posts: 145
Re: Arduino
« Reply #9 on: March 17, 2016, 10:57:47 am »
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.
to DIY or not to DIY

jb007

  • Full Member
  • ***
  • Posts: 145
Re: Arduino
« Reply #10 on: March 20, 2016, 01:53:20 pm »
Please, can anyone help me?

Thanks in advance!
to DIY or not to DIY

jmpessoa

  • Hero Member
  • *****
  • Posts: 2301
Re: Arduino
« Reply #11 on: March 20, 2016, 05:46:14 pm »
Quote
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....





Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

jb007

  • Full Member
  • ***
  • Posts: 145
Re: Arduino
« Reply #12 on: March 20, 2016, 09:13:56 pm »
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...
to DIY or not to DIY

jb007

  • Full Member
  • ***
  • Posts: 145
Re: Arduino
« Reply #13 on: March 21, 2016, 11:11:26 am »
Tonight 'm gonna try to install complete Lazarus over again and check all the instal settings and see if anything will run.
to DIY or not to DIY

jb007

  • Full Member
  • ***
  • Posts: 145
Re: Arduino
« Reply #14 on: March 24, 2016, 09:33:09 am »
Installed again, it works.
to DIY or not to DIY

 

TinyPortal © 2005-2018