* * *

Author Topic: Lazarus / RaspberyPi rpi_hal Hardware Abstraction Library  (Read 34308 times)

Handoko

  • Hero Member
  • *****
  • Posts: 1179
  • My goal: build my own game engine using Lazarus
Re: Lazarus / RaspberyPi rpi_hal Hardware Abstraction Library
« Reply #90 on: March 19, 2017, 03:21:31 am »
Sorry if it is off topic.

I know Raspberry Pi isn't expensive, I want to join the fun. But before I buy one, I wonder what you guys do with your Raspberry Pi?

Cyrax

  • Sr. Member
  • ****
  • Posts: 498
Re: Lazarus / RaspberyPi rpi_hal Hardware Abstraction Library
« Reply #91 on: March 19, 2017, 04:46:53 am »
How about making your own smartphone? https://hackaday.io/project/19035-zerophone-a-raspberry-pi-smartphone

Idea is tempting and I have put some thought on it.

Thaddy

  • Hero Member
  • *****
  • Posts: 3640
Re: Lazarus / RaspberyPi rpi_hal Hardware Abstraction Library
« Reply #92 on: March 19, 2017, 05:39:39 am »
- I have used a RPi3 - a a bet - as my main computer for almost 8 months.... And it did not disappoint.
- Build server consists of 4 RPi3's for a total of 16 threads. Builds kernels and FPC-Lazarus
- My daughter (almost 9) uses one for all kinds of stuff and MineCraft.
- My RPi -1 and 2's are used for robotics and home automation and what not.
- I also tried an OrangePi. (Really cheap but NOT recommended: bad user experience, functions as door-opener)
- There must be about 9 in total in the house + one broken. And one camera.
Why do the Danish always try to fuck up any programming language?

DonAlfredo

  • Hero Member
  • *****
  • Posts: 705
Re: Lazarus / RaspberyPi rpi_hal Hardware Abstraction Library
« Reply #93 on: March 19, 2017, 10:44:05 am »
50+ in use for rechargeable battery testing: running 24/7 for 2 years !
Arch Linux + FPC/Laz app, cross-compiled from Windows.
Not a single failure with read-only Linux file system.

sky_khan

  • Guest
Re: Lazarus / RaspberyPi rpi_hal Hardware Abstraction Library
« Reply #94 on: March 19, 2017, 11:37:38 am »
I know Raspberry Pi isn't expensive, I want to join the fun. But before I buy one, I wonder what you guys do with your Raspberry Pi?

I have a RPi2 attached to 2TB external disk. Its my low cost, low power 7/24 personal network server.  File server + scm server + dlna server.

ertank

  • Jr. Member
  • **
  • Posts: 95
Re: Lazarus / RaspberyPi rpi_hal Hardware Abstraction Library
« Reply #95 on: March 19, 2017, 01:13:24 pm »
The most known advantage of Raspberry Pi is having access to sensors, camera and alike hardware. On the other hand, you can use expensive industrial sensors, too.

I am trying to earn money with Raspberry Pi 3. Working on a software project for a device using Raspberry Pi with sensors. Device is targeted for a health sector which will count wasted material after surgeries and save some information into a database.

Just be informed that sensors Raspberry Pi uses are need to be digital for the best practice. They also need to be at certain voltage levels or else you may burn GPIO port of your Raspberry Pi.

Thaddy

  • Hero Member
  • *****
  • Posts: 3640
Re: Lazarus / RaspberyPi rpi_hal Hardware Abstraction Library
« Reply #96 on: March 19, 2017, 01:22:42 pm »
Name the voltage level: 3.3V.
Why do the Danish always try to fuck up any programming language?

sfischer

  • New member
  • *
  • Posts: 35
Re: Lazarus / RaspberyPi rpi_hal Hardware Abstraction Library
« Reply #97 on: March 19, 2017, 02:28:01 pm »
@mark,

pls. use SPI_Transfer. The SPI BufferSize is limited to 64Byte (pls. see SPI_BUF_SIZE_c). If you want to transfer more bytes, you have to split the IO into several 64Byte chunks. Your question about BaseReg. This is legacy and it comes from the idea, to address the register within a spi device. e.g write 2Bytes (e.g. 0x1234) to controlregister (0x01). in general it's a 3Byte transfer. SPI_Transfer is more basic and just transfers all at once. e.g SPI_Transfer(<bus>,<adr>,<cmdstring>); e.g SPI_Transfer($00,$00,#$01+#$12+#$34); or SPI_Transfer($00,$00,char($01)+char($12)+char($34)); This will transfer the data 0x011234 to an SPI-Device with ChipEnable0 (HW-Pin CE0) which is connected to SPI-Bus 0. The maximal length of <cmdstring> is SPI_BUF_SIZE_c=64.
If you want to see examples, pls. look for procedures/functions '_test' e.g. SPI_Loop_Test within rpi_hal.

hope this helps,
Stefan

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus