Go to advanced search

by buja
Wed Jun 05, 2019 5:43 pm
Forum: C/C++
Topic: How to control the GPIO pins using c++
Replies: 12
Views: 50533

Re: How to control the GPIO pins using c++

This is what I have: $ ls -l /usr/bin/gpio* -rwsr-xr-x 1 root root 33348 Mar 13 14:41 /usr/bin/gpio -rwxr-xr-x 1 root root 9728 Jun 29 2018 /usr/bin/gpiodetect -rwxr-xr-x 1 root root 9728 Jun 29 2018 /usr/bin/gpiofind -rwxr-xr-x 1 root root 9728 Jun 29 2018 /usr/bin/gpioget -rwxr-xr-x 1 root root 97...
by buja
Tue Jun 04, 2019 7:45 pm
Forum: C/C++
Topic: How to control the GPIO pins using c++
Replies: 12
Views: 50533

Re: How to control the GPIO pins using c++

The new recommended interface is 'gpio-cdev' which uses "/dev/gpiochip*", with 'libgpiod' to provide userland utilities. The latest Raspbian seems to support those but there's not been any discussion on here which I have seen and 'libgpiod' and userland utilities don't seem included by defult or av...
by buja
Sun May 05, 2019 2:01 pm
Forum: C/C++
Topic: i am trying to make a small window appear, with nothing in it, but it just isn't working.
Replies: 9
Views: 782

Re: Is this wrong?

Just a guess: wrong spelling: gkt => should be gtk, try: #include <gtk/gtk.h> Edit: now that I try it myself I see that you made the same typo everywhere :lol: Edit 2: it might be a good idea to download the PDF of the book and copy & paste the example programs instead of typing them, saves a few er...
by buja
Sun Apr 21, 2019 8:07 am
Forum: General discussion
Topic: Nexdock 2 - another shot
Replies: 9
Views: 838

Re: Nexdock 2 - another shot

Nexdock 2 is going to happen. 2166 backers raised $496,689 on Kickstarter in 30 days. In fact the minimum goal of $50,000 was reached within one day, so it was never really a question. The $500,000 stretch limit was not reached, however Nexdock 2 will come with a backlit keyboard anyway. So the fund...
by buja
Mon Apr 15, 2019 7:49 pm
Forum: General discussion
Topic: Nexdock 2 - another shot
Replies: 9
Views: 838

Re: Nexdock 2 - another shot

scotty101 wrote:
Mon Apr 15, 2019 12:40 pm
buja wrote:
Sun Apr 14, 2019 11:34 am
Just hope the manufacturing campaign will go equally well.
And that their factory doesn't have a fire.. and that they actually test them before they are sent out...
Indeed.
by buja
Sun Apr 14, 2019 11:34 am
Forum: General discussion
Topic: Nexdock 2 - another shot
Replies: 9
Views: 838

Re: Nexdock 2 - another shot

I think the funding campaign is a success: $422,000 with 6 days to go, a lot quicker than the Nexdock 1 campaign.
Just hope the manufacturing campaign will go equally well.
by buja
Sat Mar 23, 2019 1:47 pm
Forum: General discussion
Topic: Nexdock 2 - another shot
Replies: 9
Views: 838

Re: Nexdock 2 - another shot

The first goal of $50,000 has been reached.
Good to know: on top of the price comes $30 shipping cost (to the Netherlands, other countries may be different).
And on top of that expect import taxes and duties (at least VAT) to be paid to the delivery service.
by buja
Thu Mar 21, 2019 10:31 pm
Forum: General discussion
Topic: Nexdock 2 - another shot
Replies: 9
Views: 838

Re: Nexdock 2 - another shot

I still see the need for a mobile Pi, so that is why I ordered the new NexDock.
There are other possibilities to create a laptop Pi, but this seems a pretty good deal to me.
by buja
Thu Mar 21, 2019 6:22 pm
Forum: General discussion
Topic: Nexdock 2 - another shot
Replies: 9
Views: 838

Nexdock 2 - another shot

A new version of the Nexdock is launched on Kickstarter: https://www.kickstarter.com/projects/nexcomputer/nexdock-2 A Nexdock is basically a terminal in laptop format. To turn it into a working computer you connect a smartphone, or a Pi, to it. Nexdock 1 was discussed on this forum in 2016: https://...
by buja
Fri Jan 25, 2019 8:52 pm
Forum: C/C++
Topic: current date + time feat. also milliseconds?
Replies: 16
Views: 986

Re: current date + time feat. also milliseconds?

deleted
by buja
Fri Jan 25, 2019 6:53 pm
Forum: C/C++
Topic: current date + time feat. also milliseconds?
Replies: 16
Views: 986

Re: current date + time feat. also milliseconds?

You should have a look at the function gettimeofday() and the struct timeval.

On the command line:

Code: Select all

man gettimeofday
by buja
Thu Dec 20, 2018 1:24 pm
Forum: General discussion
Topic: Wires and peripherals, ugly or tidy?
Replies: 19
Views: 1281

Re: Wires and peripherals, ugly or tidy?

If a cluttered desk is a sign of a cluttered mind, of what, then, is an empty desk a sign?
(this is supposed to be a quote from Albert Einstein)
by buja
Fri Nov 30, 2018 4:32 am
Forum: Raspbian
Topic: Error on Foundation Website NGINX
Replies: 1
Views: 396

Re: Error on Foundation Website NGINX

Milliways wrote:
Fri Nov 30, 2018 3:20 am
I was just looking at https://www.raspberrypi.org/documentati ... r/nginx.md and noticed this still has references to PHP5

This should be updated as Stretch installs PHP5
If the page refers to PHP5 and Raspbian Stretch installs PHP5, then what is the problem?
by buja
Tue Nov 27, 2018 10:04 pm
Forum: General discussion
Topic: Print buffer
Replies: 6
Views: 381

Re: Print buffer

That would be:

Code: Select all

fflush(stdout);
right after the printf-statement.
by buja
Mon Nov 26, 2018 10:43 pm
Forum: C/C++
Topic: C vs Python which has more GPIO support?
Replies: 8
Views: 2023

Re: C vs Python which has more GPIO support?

What happened here? This question got moved from the end of a thread dating back to 2012 to this new thread. But the responses there did not move with it. ... So my incredibly valuable contribution is lost? :o For the record, it should be the second post, as a reply to zeilotech's question. So all ...
by buja
Sun Nov 25, 2018 10:20 pm
Forum: C/C++
Topic: C vs Python for GPIO
Replies: 27
Views: 20981

Re: C vs Python for GPIO

Python has more support than C. Almost every piece of hardware for the Pi comes with a Python library to support it. Supplier support for C is sometimes available, supplier support for other languages seems to be non-existent. If you like to write your own C driver software there are the GPIO librar...
by buja
Fri Nov 23, 2018 7:30 pm
Forum: Beginners
Topic: returning values from functions
Replies: 6
Views: 393

Re: returning values from functions

There are two different variables with the same name "result". The one that is initialized to 0 in line 2 is a global variable. It is never updated, so that's why it prints as 0. The one used inside the function "maths" is interpreted a a new, local variable. It's value is returned as the value of t...
by buja
Fri Nov 23, 2018 7:13 pm
Forum: Beginners
Topic: returning values from functions
Replies: 6
Views: 393

Re: returning values from functions

Try this:

Code: Select all

result = maths(100)
print result
by buja
Fri Nov 23, 2018 6:51 pm
Forum: Troubleshooting
Topic: Impossible to uninstall Firefox
Replies: 3
Views: 1172

Re: Impossible to uninstall Firefox

How did you install Firefox?
How did you uninstall Firefox?
Which commands did you use?
Which messages did you get?
Why do you think Firefox is still installed when the system tells you it is not installed anymore?
by buja
Fri Nov 23, 2018 7:00 am
Forum: Teaching and learning resources
Topic: Anyone using LaTeX
Replies: 11
Views: 5370

Re: Anyone using LaTeX

YP: Young People?
by buja
Fri Nov 23, 2018 6:52 am
Forum: Beginners
Topic: Oil boiler
Replies: 13
Views: 873

Re: Oil boiler

Did I mention clamp? I am not sure what you mean here. Looking at it some more I agree with other posters that making modifications to the boiler installation has some safety issues. Which makes the idea of some light sensor looking at the flame inspection window a very attractive one. Prices for ho...
by buja
Thu Nov 22, 2018 11:08 pm
Forum: Beginners
Topic: Oil boiler
Replies: 13
Views: 873

Re: Oil boiler

I think a Pi is perfect for this kind of thing, but there is some engineering to do. As mentioned above, tampering with 240 VAC brings serious safety issues, but even 24 VDC and 12 VDC are not without issues. And a Pi can take only 3.3 Volt DC for input, anything higher than that will fry the SOC. B...
by buja
Sun Nov 04, 2018 4:38 pm
Forum: Beginners
Topic: Trying to save edited file
Replies: 6
Views: 315

Re: Trying to save edited file

The file "/etc/default/keyboard" is owned by root, so you have to open it with root rights to save any changes:

Code: Select all

sudo nano /etc/default/keyboard
by buja
Tue Oct 30, 2018 4:56 am
Forum: C/C++
Topic: What does mtkime with tm_isdst = -1 do during DST transition?
Replies: 1
Views: 1709

Re: What does mtkime with tm_isdst = -1 do during DST transition?

No real answer I am afraid. My first thought was that tm_isdt should never be negative, but K&R says this: tm_isdt is positive if Daylight Saving Time is in effect, zero if not, and negative if the information is not available. If behavior is undefined I think the only options is to test what the be...
by buja
Fri Oct 26, 2018 8:42 am
Forum: Troubleshooting
Topic: Installing PHP using Raspbian & Nginx
Replies: 8
Views: 861

Re: Installing PHP using Raspbian & Nginx

So how do I go about installing apache? I thought nginx was used to save resources since the card is 32gb. Do I need the php-apc thing mentioned in the video? https://projects.raspberrypi.org/en/projects/lamp-web-server-with-wordpress This looks like it's only for WordPress websites. I don't want t...

Go to advanced search