About

First, I’ve been called Big Dan the <blank> Man for so long that I’ve begrudgingly grown used to it.

My primary interests are computers, electronics, and photography.

I’ve created this blog to share some of my various projects in some detail so that I don’t bore Facebook friends with all of the details of what I’m building.

Punctuation

If you ask me a question and you don’t include punctuation, don’t expect an answer. Understanding a technical question enough to answer it is difficult as it is. Don’t make it harder!

Google It!

I don’t get a ton of questions so I try to answer those I do. Some times I’m surprised at the questions that I’m asked because I find the answer immediately upon googling it (yeah, I rarely know the answer to questions I’m asked either).

Coming from the pre-internet days, Google is such an amazing tool, I cannot imagine life without it. And it seems very odd to think of never knowing life before it. It used to be when you had a problem, you read the manuals, the couple of books you might have, and ask coworkers. More often than not you had to work the solution out yourself and it would take entirely too much time.

Take advantage of this amazing tool! I very rarely post questions on any forum. Not because I don’t have a ton of them, because I do. But almost every question I can think of, someone has answered on Google, you just have to track it down, and typically that is way faster than waiting for a forum answer.

Share this:

Like this:

12 Responses to About

Hello Big dan – blogging man
best regards from Austria – excuse my bad english – but our language is german.
i have seen with great interest, your homepage – special your articel to “Lazarus and i2c with RPI”.
my interest is, to learn, open close read and write on i2c-Bus with Lazarus under RPI’s GPIO.
Please do you have a minimal sourcecode with Lazarus, that i can speek with i2c.
i have test my rpi with LXTerminal with the command: sudo i2cdetect -y 1 and i can see my i2c-device-Adresse, but now, it would be nice, if i can this in Lazarus.
Can you help please?
Thanks and best regards form styria – Austria
Hans-Peter Traussnigg

Hi Dan.
1000 Thanks for answer. But i have questions to your “program testr2c”.

Is this a program, how use the commandline from LXTerminal or so?
I need to have a “visual Lazarus” form, with buttons and Label.caption to see my i2c – commands.
Is this also going with your program? There probably need commands as: i2c start, i2cstop, i2cread and i2cwrite or so…..

If I understand your question, you want to know if I used the gui components of lazarus? No, this was a simple lazarus console program, but it should work from the GUI interface too. The nice thing about how this is implemented is you are using standard library calls (fpopen, etc). Nothing tricky at the application level.

Here is some commentary for the program:

handle := fpopen(devPath,O_RDWR); – This opens the I2C device for read/write. devPath contains ‘/dev/i2c-1’. You may want to verify that is the correct path for you too.

fpIOCtl(handle, I2C_SLAVE, pointer(iDevAddr)); – this indicates the opened file handle is going to be an I2C_SLAVE device and the address is iDevAddr ($68). You can get that with your i2cdetect command.

fpwrite(handle, buf, 1); – fpwrite is how you send data to the I2C device. Here I send just the first byte of .

Dear Dan
I have great interest to find a solution by your proposal in Lazarus.
Still it does not work with connect the I2C interface.
It comes after the first compilation of Note:
Hint: conversion in between odrinals and pointers is not portable!

Then some error messages come.

The most important thing for me and my anderstand:
What is I2C_Slave = 1795; — why 1795 – is this realy the I2C-Device-Adress?
and what is : iDevAddr: cint = $04 – is this also a I2C- Device-Adress ?
What is true??

Hello Dan.I’m from Turkey.I have a question about “SIM800L”
Is there a any problems occurs about IMEI registeration of “SIM800L GPRS” modul? I have a SIM800L but when I power on my modul I will just use it within country for 2 months.After 2 months it will be closed.

Can I change the IMEI number of modul via FTDI connection. I want to use it my bike alarm project. Thanks.