Go to advanced search

by dsyleixa123
Sun Nov 28, 2021 8:47 am
Forum: C/C++
Topic: tone() lib for the Pi?
Replies: 12
Views: 416

Re: tone() lib for the Pi?

I doubt there is such a library. It would need to be bound to a particular GPIO library and is so trivial why would anyone bother to separate it from the GPIO library? just when you find it trivial, why isn't there any - at least in wiringPi or pigpio I don't detect any which is quite similar to to...
by dsyleixa123
Sun Nov 28, 2021 8:42 am
Forum: C/C++
Topic: tone() lib for the Pi?
Replies: 12
Views: 416

Re: tone() lib for the Pi?

buja wrote:
Sat Nov 27, 2021 9:03 pm
Googling on "c sound library linux" does not give anything useful?
actually no, I don't find code with useable/useful examples. What would you suggest?
by dsyleixa123
Sat Nov 27, 2021 7:35 pm
Forum: C/C++
Topic: tone() lib for the Pi?
Replies: 12
Views: 416

Re: tone() lib for the Pi?

IIUC, pwm is another thing: it always has the same frequency (e.g. 800 Hz) but different arbitrary duty cycles - that's available e.g. via wiringPi. Other than tone: for this different frequencies are needed additionally (plus different duty cycles perhaps additionally). But I agree, if it's possibl...
by dsyleixa123
Sat Nov 27, 2021 11:37 am
Forum: C/C++
Topic: tone() lib for the Pi?
Replies: 12
Views: 416

Re: tone() lib for the Pi?

Although I have no clue how to do that - why would it be so complicated to write such a lib given that it still doesn't exist yet?
by dsyleixa123
Wed Nov 24, 2021 5:06 pm
Forum: C/C++
Topic: Suggestion for C/C++ IDE for Raspberry Pi 4 (2GB RAM) with debug and cmake support
Replies: 12
Views: 578

Re: Suggestion for C/C++ IDE for Raspberry Pi 4 (2GB RAM) with debug and cmake support

swampdog wrote:
Wed Nov 24, 2021 3:48 pm
Is the system qtcreator able to import cmake projects? It might be usable in 2Gb.
why do you think it's needed?
qt creator has it's own qmake, and I am compiling all my qt5 projects out of the qt creator GUI IDE locally on my Pi2v1 with just 1GB Ram... :roll:
by dsyleixa123
Wed Nov 24, 2021 11:34 am
Forum: C/C++
Topic: tone() lib for the Pi?
Replies: 12
Views: 416

Re: tone() lib for the Pi?

scotty101 wrote:
Wed Nov 24, 2021 11:31 am
I guess you'll have to write one yourself.
:lol:
by dsyleixa123
Wed Nov 24, 2021 11:18 am
Forum: C/C++
Topic: tone() lib for the Pi?
Replies: 12
Views: 416

Re: tone() lib for the Pi?

thanks, but that is Python, isn't it? I mean of course C/C++ (here in this subforum).
by dsyleixa123
Wed Nov 24, 2021 11:07 am
Forum: C/C++
Topic: tone() lib for the Pi?
Replies: 12
Views: 416

Re: tone() lib for the Pi?

tbh, very strange that it doesn't exist yet.
by dsyleixa123
Wed Nov 24, 2021 8:57 am
Forum: C/C++
Topic: Why no warning?
Replies: 46
Views: 1792

Re: Why no warning?

Unfortunately C# and Java are not compiled to machine code so performance suffers. Worse still they require huge run-time systems to run their byte codes. IIRC, the Java framework has a built-in JIT compiler, so at the start it just (slowly) interpretes the intermediate bytecode, but after a short ...
by dsyleixa123
Tue Nov 23, 2021 7:29 pm
Forum: General discussion
Topic: Raspi 3B+ or 4 power supply by battery
Replies: 7
Views: 285

Re: Raspi 3B+ or 4 power supply by battery

well,I don't fly to the USA... I also won't take the Raspi with me, just my Windows notebook. So no reason to buy a smaller powerbank :twisted:
by dsyleixa123
Tue Nov 23, 2021 2:16 pm
Forum: General discussion
Topic: Linux vs Windows
Replies: 116
Views: 3698

Re: Linux vs Windows

I think it was simply intended as an example of good documentation. yes, of course. Yes it is english didactics is more the art and the science of teaching, at my University e.g. we had courses for students becoming teachers, e.g. didactics of mathematics, didactics of chemistry, ... OTOH, claiming...
by dsyleixa123
Tue Nov 23, 2021 2:00 pm
Forum: General discussion
Topic: Linux vs Windows
Replies: 116
Views: 3698

Re: Linux vs Windows

That's C++. Which may well be entirely different to the system libm maths library.
this topic is about Linux vs Windows, not about C vs C++.
So the teaching resources to either PL may differ.
by dsyleixa123
Tue Nov 23, 2021 1:53 pm
Forum: General discussion
Topic: Linux vs Windows
Replies: 116
Views: 3698

Re: Linux vs Windows

yes, also e-books, or e-tutorials, or didactically good websites ;)
(is "didactical/didactic" not an English word?)
by dsyleixa123
Tue Nov 23, 2021 1:48 pm
Forum: General discussion
Topic: Linux vs Windows
Replies: 116
Views: 3698

Re: Linux vs Windows

but crucial for learning is 1st of all having didactically sophisticated tutorials and tons of example code, for either keyword or programming problem.
man pages are not for teaching stuff, but that is what it needs - and that's no difference either for Windows or for Linux OS or anything.
by dsyleixa123
Tue Nov 23, 2021 1:21 pm
Forum: General discussion
Topic: Linux vs Windows
Replies: 116
Views: 3698

Re: Linux vs Windows

yes, that's more elaborated and detailed, but I consider it as a little overexaggerated: which beginner needs it actually? Above all, a non-pro would need didactical tutorials and working example code, plus warnings what may go wrong. It's enough to know which values are undefined or critical to avo...
by dsyleixa123
Tue Nov 23, 2021 12:54 pm
Forum: General discussion
Topic: Linux vs Windows
Replies: 116
Views: 3698

Re: Linux vs Windows

why incomplete (to the levels of a beginner or a hobby programmer)? You have examples for correct usage (which is crucial), and you can clearly see which values are mathematically critical or undefined to handle them accordingly (in the same way how you do it to avoid divisions by zero or calculatin...
by dsyleixa123
Tue Nov 23, 2021 12:43 pm
Forum: General discussion
Topic: Linux vs Windows
Replies: 116
Views: 3698

Re: Linux vs Windows

by dsyleixa123
Tue Nov 23, 2021 11:48 am
Forum: General discussion
Topic: Linux vs Windows
Replies: 116
Views: 3698

Re: Linux vs Windows

But anyway man pages are actually not that useful for newbies (...) Personally, I've always found man pages totally unfriendly and will only use them as a last resort. I tend to find 'man' and other API documentation to be of little use. If you know what you are doing you don't need it, and if you ...
by dsyleixa123
Tue Nov 23, 2021 7:39 am
Forum: General discussion
Topic: Raspi 3B+ or 4 power supply by battery
Replies: 7
Views: 285

Re: Raspi 3B+ or 4 power supply by battery

my current LiPo powerbank I was speaking of has 3x USB 2A plugs by all over 100Wh, it works well for a couple of hours with my Pi2 B (also powering my HDMI TFT by a 12V step-up converter) and I actually wouldn't like to buy a new one...
by dsyleixa123
Mon Nov 22, 2021 7:54 pm
Forum: General discussion
Topic: Linux vs Windows
Replies: 116
Views: 3698

Re: Linux vs Windows

In my experience, programming in Windows is a nightmare, programming in Linux is only half a nightmare :shock: well, that depends, I was successfully using Borland C++ Builder for my Windows PC and even built a USB-Serial interface for communication to my Arduino boards. That was actually almost id...
by dsyleixa123
Mon Nov 22, 2021 6:34 pm
Forum: General discussion
Topic: Raspi 3B+ or 4 power supply by battery
Replies: 7
Views: 285

Raspi 3B+ or 4 power supply by battery

hi, I would like to buy a Raspi 3B+ or 4 for mobile use which I'll have to power by a batterypack/power bank. My power bank has just a couple of USB 2 ports but they provide just 2 A each (which is currently enough for my Pi2). But IIRC, the Pi3 would need 3A (the Pi4 perhaps even more via USB-C), s...
by dsyleixa123
Mon Nov 22, 2021 1:13 pm
Forum: C/C++
Topic: tone() lib for the Pi?
Replies: 12
Views: 416

tone() lib for the Pi?

is there a tone() lib available for the Pi (output via GPIO pin or headphone jack)? with a functionality e.g. like for standard Arduinos https://www.arduino.cc/en/Tutorial/BuiltInExamples/toneMelody or e.g. like for ESP32 by Arduino IDE which mimics that https://www.pschatzmann.ch/home/2021/01/07/es...
by dsyleixa123
Sun Nov 21, 2021 1:39 pm
Forum: C/C++
Topic: Why no warning?
Replies: 46
Views: 1792

Re: Why no warning?

in C++ there is function decltype() available, by #include <typeinfo>

if you compile your C program by g++ and include this lib you may check at runtime if the variable types (e.g., int or float etc) are valid.
by dsyleixa123
Sun Nov 21, 2021 10:15 am
Forum: C/C++
Topic: C++: extension of a class (e.g., string class)
Replies: 36
Views: 1079

Re: C++: extension of a class (e.g., string class)

hmmh - tbh, it's still unclear. when you say 1) prefer composition over inheritance, 2) never inherit from std::string, and 3) if it works, it works: which are actually the pros of composition over inheritance? My goal is to use possibly all of the already available features of an existing class and...
by dsyleixa123
Sun Nov 21, 2021 8:49 am
Forum: C/C++
Topic: C++: extension of a class (e.g., string class)
Replies: 36
Views: 1079

Re: C++: extension of a class (e.g., string class)

thank you a lot! I just tested it, your new readStringUntil() method looks really interesting, and it compiles and builds fine, too (except the line t1 = t.readStringUntil('4', 2); which falsely returns "0123" instead of "23" - but I c+p'ed in my former version and now it also wo...

Go to advanced search