Go to advanced search

by 1dot0
Fri Aug 11, 2017 10:19 am
Forum: C/C++
Topic: importance of flag -lrt ?
Replies: 6
Views: 2046

importance of flag -lrt ?

hello, sometimes I found the compiler flag -lrt in some examples, probably related to librt.so - but what is the importance? Somewhere was written it is only important for cross-compiling, not for local compiling (still uncertain about the purpose), and somewhere I read (IIRC) that it is a real-time...
by 1dot0
Mon Aug 07, 2017 8:30 pm
Forum: C/C++
Topic: Efficiently display openCV processed image
Replies: 20
Views: 10510

Re: Efficiently display openCV processed image

thanks, but well...
VideoCapture cap(0);
is also what you are doing in your code above, what is the difference?

Code: Select all

VideoCapture cap(0);
	cap.set(CV_CAP_PROP_FRAME_WIDTH, 1280);
	cap.set(CV_CAP_PROP_FRAME_HEIGHT, 720);
by 1dot0
Mon Aug 07, 2017 7:09 am
Forum: C/C++
Topic: [pigpio] Bad I2C Bus
Replies: 6
Views: 1804

Re: [pigpio] Bad I2C Bus

i2c-1 can be enabled via the menu settings (Pixel system preferences or raspi-config), just i2c-0 is obscured and has to be enabled seperately in /boot/config.txt
by 1dot0
Sun Aug 06, 2017 2:41 pm
Forum: C/C++
Topic: Error linking lib wiringPi
Replies: 13
Views: 4705

Re: Error linking lib wiringPi

what if the installation was corrupted? Finally even the simple blink example apparently does not work fot the OP. that's why I adviced to make a clean uninstall before. about the PWM I actually had found an old example which uses pwmWrite(pwmPin, pwmValue); That made me assume that it's outdated an...
by 1dot0
Sun Aug 06, 2017 9:00 am
Forum: C/C++
Topic: Error linking lib wiringPi
Replies: 13
Views: 4705

Re: Error linking lib wiringPi

PeterO -> I'm using the command the example give : gcc -Wall -o blink blink.c -lwiringPi Gordon -> I'm running on Raspbian. I was working some years ago with RPIO and PMW to run a motor. But with the time, the lib seems to be not maintained anymore so I cannot continue my work with it. So I searche...
by 1dot0
Sat Aug 05, 2017 8:56 pm
Forum: C/C++
Topic: Efficiently display openCV processed image
Replies: 20
Views: 10510

Re: Efficiently display openCV processed image

hi,
that's GREAT, thanks for sharing your code!

Just out of interest, because I have a USB cam, not a Pi cam:
How would the code have to be cahnges to work for a USB cam instead?
by 1dot0
Sat Aug 05, 2017 11:28 am
Forum: C/C++
Topic: [pigpio] Bad I2C Bus
Replies: 6
Views: 1804

Re: [pigpio] Bad I2C Bus

I don't disagree that i2c bus#0 is there, but I wouldn't use it. It is used by the video core, (aka the GPU), for things like the camera. You almost certainly want to follow the good advice of changing to i2c bus#1 instead. It will save you lots of headaches in the long run. I agree that the 1st op...
by 1dot0
Fri Aug 04, 2017 9:14 am
Forum: C/C++
Topic: Simple Audio in C/C++
Replies: 1
Views: 1000

Re: Simple Audio in C/C++

Hi All. I need some advice in building a small project on Pi Zero. Here is my idea. I want to write a C/C++ program, that can do the following: 1) when I press & and hold a button on the PI Zero, the PI will record my voice (from a audio input). 2) once I release the button, the PI should convert m...
by 1dot0
Thu Aug 03, 2017 5:33 pm
Forum: C/C++
Topic: [pigpio] Bad I2C Bus
Replies: 6
Views: 1804

Re: [pigpio] Bad I2C Bus

I2C bus 0 is not exposed on the header, it's I2C bus 1. Change the first parameter to a 1 and make sure that it's enabled by doing "ls /dev" and make sure it's visible in the list. If not, run raspi-config and enable it. I have to disagree, both i2c-1 and i2c-0 are exposed on the header. i2c-1: phy...
by 1dot0
Mon Jul 31, 2017 11:29 am
Forum: C/C++
Topic: Arduino Strings library for wiringpi
Replies: 5
Views: 1639

Re: Arduino Strings library for wiringpi

The C++ programming language has std::string and supports object-oriented programming natively. The "Arduino Language" might or might not be considered a rebranded C++ . ghans The Arduino API is actually not a rebranded C++, it's written in C++ and it uses C++ syntax (admittedly it replaces some Li...
by 1dot0
Sun Jul 30, 2017 4:34 pm
Forum: C/C++
Topic: start with C in raspberry pi
Replies: 1
Views: 9850

Re: start with C in raspberry pi

hello, here is a pretty good tutorial for the first steps: http://fractal.math.unr.edu/~ejolson/pi/Essentials_C_Modified.pdf I personally would recommend to edit and compile on the Pi, no cross compiler and no ssh, just plug keyboard + mouse + a reasonable HDMI screen to it! The tutorial explains ho...
by 1dot0
Thu Jul 27, 2017 4:10 pm
Forum: General discussion
Topic: Pi2 SD image (old Pi2): will it p'n'p work for a new Pi 3 too?
Replies: 10
Views: 1674

Re: Pi2 SD image (old Pi2): will it p'n'p work for a new Pi 3 too?

So what about the Pi3 and my NOOBS-based aupdated old-Pi2 SD card? will it run or sure or not? It is very likely that without some action on your part that the microSD card will NOT boot up an RPi3 or other similar recent hardware. There is documentation that explains what to do: it involves 'trans...
by 1dot0
Thu Jul 27, 2017 4:01 pm
Forum: General discussion
Topic: Pi2 SD image (old Pi2): will it p'n'p work for a new Pi 3 too?
Replies: 10
Views: 1674

Re: Pi2 SD image (old Pi2): will it p'n'p work for a new Pi 3 too?

I don't understand.
Can I put my old Pi2 SD card into a Pi3 and will it boot and run then everything or not?
by 1dot0
Thu Jul 27, 2017 3:48 pm
Forum: General discussion
Topic: Pi2 SD image (old Pi2): will it p'n'p work for a new Pi 3 too?
Replies: 10
Views: 1674

Re: Pi2 SD image (old Pi2): will it p'n'p work for a new Pi 3 too?

I have installed Raspian Jessie via NOOBS, but then updated vos update/upgrade - so what does this mean for my problem eventually? Better buy an old Pi2 again? You can't buy an old Pi2 (except maybe 2nd hand), the Pi2's that you can buy now have the same processor as the Pi3 . exactly, I can old on...
by 1dot0
Thu Jul 27, 2017 3:00 pm
Forum: General discussion
Topic: Pi2 SD image (old Pi2): will it p'n'p work for a new Pi 3 too?
Replies: 10
Views: 1674

Re: Pi2 SD image (old Pi2): will it p'n'p work for a new Pi 3 too?

I have installed Raspian Jessie via NOOBS, but then updated vos update/upgrade -
so what does this mean for my problem eventually? Better buy an old Pi2 again?
by 1dot0
Thu Jul 27, 2017 2:14 pm
Forum: General discussion
Topic: Pi2 SD image (old Pi2): will it p'n'p work for a new Pi 3 too?
Replies: 10
Views: 1674

Re: Pi2 SD image (old Pi2): will it p'n'p work for a new Pi 3 too?

I have made backups frequently (last update/upgrade about 1-2 weeks ago), and the SD is fine - making another update/upgrade on another Pi2 is not a problem though. I do know what I have to reinstall and re-configure, I actually have a list of all things to be done. But I want to be 100% sure that I...
by 1dot0
Thu Jul 27, 2017 2:00 pm
Forum: General discussion
Topic: Pi2 SD image (old Pi2): will it p'n'p work for a new Pi 3 too?
Replies: 10
Views: 1674

Pi2 SD image (old Pi2): will it p'n'p work for a new Pi 3 too?

hi, my elder Pi2 is broken, does not start when plugging USB voltage (5V, 2A) any more (no LED going on, getting warm, 0.9A current for nothing - a friend's Pi2 works fine at that USB though). Now I have to buy a new one, and I am concerned about my current SD image: will it p'n'p work for a new Pi ...
by 1dot0
Sun Jul 23, 2017 8:09 am
Forum: C/C++
Topic: what is memory barrier
Replies: 8
Views: 4244

Re: what is memory barrier

I also read it's a ARMv8, but I also read about ARM53 for the Pi3 (and new Pi2) - just curious about what's true and what's the difference in case.

(edited, typos)
by 1dot0
Thu Jul 20, 2017 10:49 am
Forum: C/C++
Topic: How to use two libraries at the same time on Geany
Replies: 24
Views: 3248

Re: How to use two libraries at the same time on Geany

cum granum salis, I agree, nonetheless I would assume that it's more about "willing to" than "capable of". I make absolutely no apology for being direct and to the point. If you don't like what I write, then simply add me to your foe list, I don't care if you can't take advice in the spirit it is g...
by 1dot0
Thu Jul 20, 2017 9:38 am
Forum: C/C++
Topic: How to use two libraries at the same time on Geany
Replies: 24
Views: 3248

Re: How to use two libraries at the same time on Geany

Learn how to make posts using quote and code tags properly would be a good step ! As it stands your post is pretty incomprehensible ! PeterO Thank you,I will study and please learn how to talk people properly. Don't be so aggressive. don't care about PeterO's statements, already other people have c...
by 1dot0
Wed Jul 19, 2017 8:35 am
Forum: C/C++
Topic: .wav file: play from a C/C++ program (Raspbian)
Replies: 33
Views: 9320

Re: .wav file: play from a C/C++ program (Raspbian)

It's all there in https://github.com/tinyalsa/tinyalsa/blob/master/utils/tinyplay.c It takes a wav file name as a parameter (in argv) and plays it. If you can't work it out from there, well maybe you need to learn more about C programming first. PeterO just like always PeterO's posts are famous for...
by 1dot0
Wed Jul 19, 2017 8:22 am
Forum: C/C++
Topic: .wav file: play from a C/C++ program (Raspbian)
Replies: 33
Views: 9320

Re: .wav file: play from a C/C++ program (Raspbian)

aah, thanks! 8-)
by 1dot0
Wed Jul 19, 2017 8:18 am
Forum: C/C++
Topic: .wav file: play from a C/C++ program (Raspbian)
Replies: 33
Views: 9320

Re: .wav file: play from a C/C++ program (Raspbian)

Playing a .wav file with a single function call with the name of the .wav file sounds like the most basic operation I can imagine, so 1dot0 asks the right question. I can totally see code like this: if (error) playwav("error.wav"); else playwav("okay.wav"); It may be trivial, but useful. For many p...
by 1dot0
Wed Jul 19, 2017 5:20 am
Forum: C/C++
Topic: .wav file: play from a C/C++ program (Raspbian)
Replies: 33
Views: 9320

Re: .wav file: play from a C/C++ program (Raspbian)

It's not complex it's just an error with using deprecated functions so use the new ones that replaced them. Don't have a Pi with linux to try it but it compiles without error so you never know you could be lucky /* tinyplay.c ** ** Copyright 2011, The Android Open Source Project ** ** Redistributio...
by 1dot0
Tue Jul 18, 2017 9:10 pm
Forum: C/C++
Topic: RaspberryPi C++ Blog
Replies: 26
Views: 4223

Re: RaspberryPi C++ Blog

looks very nice, but 1 suggestion though: especially for beginners it's completely overtaxing to have to use makefiles or even cmake. It's much easier if one uses Geany instead. Geany comes already completely installed with the Jessie Pixel distribution, but it also can be easiliy reinstalled by a s...

Go to advanced search