Go to advanced search

by buja
Sun Dec 22, 2019 6:30 pm
Forum: C/C++
Topic: C++ FTP library or tools or... ? Need to automate getting and unzipping....
Replies: 2
Views: 397

Re: C++ FTP library or tools or... ? Need to automate getting and unzipping....

A combination of cron for the timing, wget for the downloading and an unzip program (not sure which one) would do the trick quite nicely. No need to use C, C++ or whatever programming language, just simple Linux tools.
by buja
Sat Nov 30, 2019 7:01 am
Forum: C/C++
Topic: gpio_fsel() won't set to output
Replies: 1
Views: 274

Re: gpio_fsel() won't set to output

Yes, I am afraid something is wrong with your BCM pin 18. This slightly modified version of your program works on my Pi. #include <stdio.h> #include <bcm2835.h> #define LED 18 int main(int argc, char **argv) { printf("hello, just starting the main loop\n"); if(!bcm2835_init()) return 1; bcm2835_gpio...
by buja
Sun Nov 17, 2019 5:40 pm
Forum: Beginners
Topic: Cant start Sonic Pi
Replies: 11
Views: 568

Re: Cant start Sonic Pi

Yes, I could hear the music playing through a set of PC speakers, connected to the Pi with a jack plug.
by buja
Sun Nov 17, 2019 1:06 pm
Forum: Beginners
Topic: Cant start Sonic Pi
Replies: 11
Views: 568

Re: Cant start Sonic Pi

The screenshot shows Sonic Pi version 2.10, it looks like you are trying to run some old stuff.

Raspbian Buster has version 3.1.0 in the repository and installed by default.
And it runs, as I am typing this Monday Blues is playing (it's one of the examples).
by buja
Tue Nov 05, 2019 6:35 pm
Forum: General programming discussion
Topic: git and merging branches
Replies: 7
Views: 1059

Re: git and merging branches

I am not a git guru, but it seems to me that after merging your bugfix branch (I will call this bugfix1) with the master branch, the master branch is your new baseline. So any new bugfixes should be made on a new branch, say bugfix2, tested, and merged with the master branch again. There is no need ...
by buja
Fri Nov 01, 2019 10:52 am
Forum: HATs and other add-ons
Topic: LTE Hats which comply with CE
Replies: 1
Views: 434

Re: LTE Hats which comply with CE

The Waveshare one comes in different versions, one of which has CE.
Just below the prices you can choose the version you want.
by buja
Fri Nov 01, 2019 6:51 am
Forum: C/C++
Topic: How do I program a Sensor with C and no TP libraries
Replies: 17
Views: 1603

Re: How do I program a Sensor with C and no TP libraries

This question can be divided in two questions: 1. How to program with the GPIO's (reading and writing them)? 2. How to program a sensor? For question 1 the link mentioned above by Heater gives 5 possibilities, but if you don't want to use a third party library you can use only 2 of them. For questio...
by buja
Mon Oct 28, 2019 10:40 am
Forum: Beginners
Topic: BricsCAD on RPi4B 4GB
Replies: 4
Views: 553

Re: BricsCAD on RPi4B 4GB

I am afraid fruitoftheloom is right that BricsCAD is not going to run on a Pi, and even the next Ubuntu version will not solve that problem. LibreCAD could be a solution, however LibreCAD does not work with the DWG format but with the DXF format, so this would involve conversion. Replacing your old ...
by buja
Sat Oct 26, 2019 5:40 pm
Forum: Python
Topic: How to transform ADS1115 values to percent
Replies: 3
Views: 595

Re: How to transform ADS1115 values to percent

wet% = -0.00779 * reading + 176.74 (a simple matter of 2 linear equations with 2 unknowns, totally solvable)

That is, if the linear relationship applies and wet% in air is really 0%.
by buja
Sat Oct 26, 2019 10:15 am
Forum: C/C++
Topic: how to compile a c program on a pi 3b running raspbian buster
Replies: 5
Views: 1318

Re: how to compile a c program on a pi 3b running raspbian buster

Strange, this should have worked right out of the box. What happens if you remove the #include line from the source? gcc will complain about a missing printf prototype of course, but produce an executable anyway. I found the missing headerfile on my system in: /usr/include/arm-linux-gnueabihf/bits I...
by buja
Mon Aug 19, 2019 8:07 pm
Forum: General discussion
Topic: Modding 1gig PI4B, with 8gb or 16gig ram chip
Replies: 17
Views: 2048

Re: Modding 1gig PI4B, with 8gb or 16gig ram chip

So, what's the problem :lol:
by buja
Wed Jul 24, 2019 6:58 am
Forum: Raspberry Pi OS
Topic: How to keep Raspbian Buster Lite small?
Replies: 5
Views: 662

Re: How to keep Raspbian Buster Lite small?

That won't happen, the update/upgrade procedure only updates and upgrades the packages that are already installed.
It will not install for example all GUI stuff.
by buja
Wed Jun 05, 2019 5:43 pm
Forum: C/C++
Topic: How to control the GPIO pins using c++
Replies: 14
Views: 65619

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: 14
Views: 65619

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: 17
Views: 2398

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: 10
Views: 2077

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: 10
Views: 2077

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: 10
Views: 2077

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: 10
Views: 2077

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: 10
Views: 2077

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: 10
Views: 2077

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: 1769

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: 1769

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: 1957

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: Raspberry Pi OS
Topic: Error on Foundation Website NGINX
Replies: 1
Views: 529

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?

Go to advanced search