Go to advanced search

by dsyleixa123
Wed Oct 16, 2019 10:07 am
Forum: C/C++
Topic: Best way to wait on an event
Replies: 17
Views: 374

Re: Best way to wait on an event

Yeah sleep and select are out, they are not suitable as I have no idea on how fast or slow events will come thru and are crude hacks. AFAIK sleep() or delay() etc provide the free execution time to the time slice scheduler for other threads, so they are non-blocking (CMIIW), I've always been using ...
by dsyleixa123
Wed Oct 16, 2019 9:57 am
Forum: C/C++
Topic: Running C/C++ on Raspberry Pi
Replies: 32
Views: 1198

Re: Running C/C++ on Raspberry Pi

rpdom wrote:
Wed Oct 16, 2019 9:54 am
dsyleixa123 wrote:
Wed Oct 16, 2019 9:14 am
on the Pi, also Geany needs no installation (as it comes pre-installed ;) )
Not on any of mine, it doesn't. (Running Raspbian Lite headless on all of them). I'll stick with vi, thanks :)
who in the world needs Raspbian Lite headless, esp as a beginner? :D
by dsyleixa123
Wed Oct 16, 2019 9:49 am
Forum: C/C++
Topic: Running C/C++ on Raspberry Pi
Replies: 32
Views: 1198

Re: Running C/C++ on Raspberry Pi

Heater wrote:
Wed Oct 16, 2019 9:28 am
Yes, I find all kind of junk pre-installed on a full up Raspbian :)
e.g., like vi :D
by dsyleixa123
Wed Oct 16, 2019 9:14 am
Forum: C/C++
Topic: Running C/C++ on Raspberry Pi
Replies: 32
Views: 1198

Re: Running C/C++ on Raspberry Pi

on the Pi, also Geany needs no installation (as it comes pre-installed ;) )
by dsyleixa123
Wed Oct 16, 2019 7:57 am
Forum: C/C++
Topic: Running C/C++ on Raspberry Pi
Replies: 32
Views: 1198

Re: Running C/C++ on Raspberry Pi

vi with a mouse and colored code highlighting and compile+run out of the program a.s.o...? If I type vi in the console it's just an ugly b+w text-box. (ok, nano is surely even worse, actually not even worth mentioning...) PS, and don't forget: this topic is about a beginner to C(++) programming on t...
by dsyleixa123
Wed Oct 16, 2019 7:11 am
Forum: C/C++
Topic: Running C/C++ on Raspberry Pi
Replies: 32
Views: 1198

Re: Running C/C++ on Raspberry Pi

haha, I had bet that my post would provoke those answers :D But for programming I never use terminal windows and neither ssh, for programming on the Pi one would need a mouse, a comfortable File menu, several tabs, colored code highlighting, symbols and docs side bar, auto-intend, check for brackets...
by dsyleixa123
Tue Oct 15, 2019 9:12 pm
Forum: C/C++
Topic: Running C/C++ on Raspberry Pi
Replies: 32
Views: 1198

Re: Running C/C++ on Raspberry Pi

vi is really a cumbersome crutch from times when the rock'n'roll was invented and which honestly makes me vomite - instead, Geany is a handsome and reasonable editor and IDE.
by dsyleixa123
Tue Oct 15, 2019 7:34 am
Forum: C/C++
Topic: GCC compiler for SAMD21
Replies: 4
Views: 169

Re: GCC compiler for SAMD21

Arduino IDE can install Cortex M0 compilers yes, Arduino is feat. SAMD21 cores, but it supports boards , not native ICs: https://www.google.com/search?client=firefox-b-d&q=Arduino+SAMD21 But there are also small Arduino-compatible development boards for SAMD21 availabe: https://www.avdweb.nl/arduin...
by dsyleixa123
Mon Oct 14, 2019 4:23 pm
Forum: C/C++
Topic: Where can I begin learning C/C++?
Replies: 57
Views: 2221

Re: Where can I begin learning C/C++?

OK, I associated Arduino with the AVR. I don't know it also works with other processors. The AVR processor I played with I think had 32KB RAM. It's actually one of the biggest advantages of Arduino: 1 highlevel API which fits all boards by providing tons of different cores. https://www.arduino.cc/e...
by dsyleixa123
Mon Oct 14, 2019 2:45 pm
Forum: C/C++
Topic: qtcreator (qt5, qtdesigner): how to access GPIOs (r/w pins, i2c devices, UART,...)? [solved]
Replies: 56
Views: 2192

Re: qtcreator (qt5, qtdesigner): how to access GPIOs (r/w pins, i2c devices, UART,...)? [solved]

yes, my installation was basically the following, quoted from several posts from here (for Raspbian Stretch): sudo apt-get update sudo apt-get upgrade sudo reboot sudo apt-get autoremove sudo apt install qtcreator sudo apt install gnustep gnustep-devel clang-3.8-doc llvm-3.8-doc qtbase5-dev cmake kd...
by dsyleixa123
Mon Oct 14, 2019 2:04 pm
Forum: C/C++
Topic: Where can I begin learning C/C++?
Replies: 57
Views: 2221

Re: Where can I begin learning C/C++?

what do you mean by "such a small device"? Arduino supports really small AVRs with 16MHz/2.5 kB RAM, but also really big ones (ARM Cortex-M4 with Floating Point Unit, or ESP32) up to 180MHz/1M Flash/256K RAM and perhaps more (feat. stdio.h, RTOS, std::thread 8) ), and anything in between. Of course ...
by dsyleixa123
Mon Oct 14, 2019 1:56 pm
Forum: C/C++
Topic: qtcreator (qt5, qtdesigner): how to access GPIOs (r/w pins, i2c devices, UART,...)? [solved]
Replies: 56
Views: 2192

Re: qtcreator (qt5, qtdesigner): how to access GPIOs (r/w pins, i2c devices, UART,...)? [solved]

I personally do not know, I am happy that wiringPi works, with it's simplicity 8)
by dsyleixa123
Mon Oct 14, 2019 10:55 am
Forum: C/C++
Topic: Where can I begin learning C/C++?
Replies: 57
Views: 2221

Re: Where can I begin learning C/C++?

Arduino IS NOT C++, it USES C++, providing a high level-API for a convenient way to use different MCUs (AVR, SAM, SAMD, ESP) also by non-professional pogrammers (by help of Go and java IDE "processings"): https://arduinohistory.github.io/ http://people.interactionivrea.org/h.barragan/thesis/thesis_l...
by dsyleixa123
Sun Oct 13, 2019 10:39 am
Forum: C/C++
Topic: Where can I begin learning C/C++?
Replies: 57
Views: 2221

Re: Where can I begin learning C/C++?

IMO a beginner is overburdened having to learn all features of a PL completely, regardless whether it's C, C++ or even different ones. I agree about Arduino API using C++, and the reason why it has such a tremendous success is that Arduino provides step-by-step examples which are project-specific an...
by dsyleixa123
Fri Oct 11, 2019 9:36 am
Forum: C/C++
Topic: QSerialBus (Modbus), QTCreator 5 and RaspBerry
Replies: 8
Views: 456

Re: QSerialBus (Modbus), QTCreator 5 and RaspBerry

Raspbian Stretch on a Pi2 v1
by dsyleixa123
Fri Oct 11, 2019 9:19 am
Forum: C/C++
Topic: Creating a Raspberry Pi program in Qt Creator
Replies: 28
Views: 3510

Re: Creating a Raspberry Pi program in Qt Creator

I'm using Qt5 with Raspberry Pi 3A+, Raspbian (Stretch): ... And also if you're using Serial Port: apt-get update libqtserialport5-dev trying to update libqtserialport5-dev actually don't work, I get errors: apt-get update libqtserialport5-dev E: Der Befehl »update« akzeptiert keine Argumente. also...
by dsyleixa123
Fri Oct 11, 2019 9:11 am
Forum: C/C++
Topic: QSerialBus (Modbus), QTCreator 5 and RaspBerry
Replies: 8
Views: 456

Re: QSerialBus (Modbus), QTCreator 5 and RaspBerry

hello, trying to install sudo apt install libqt5serialbus5 libqt5serialbus5-dev I get errors sudo apt install libqt5serialbus5 libqt5serialbus5-dev Paketlisten werden gelesen... Fertig Abhängigkeitsbaum wird aufgebaut. Statusinformationen werden eingelesen.... Fertig E: Paket libqt5serialbus5 kann n...
by dsyleixa123
Mon Oct 07, 2019 7:45 am
Forum: C/C++
Topic: qtcreator: how to write in a text frame widget by the program? [solved]
Replies: 12
Views: 481

Re: qtcreator: how to write in a text frame widget by the program?

thank you very much!
It's not urgent for me right now but I'll keep it in mind if I once will need a text spreadsheet, but ftm it's too complicated tbh...
by dsyleixa123
Mon Oct 07, 2019 7:41 am
Forum: C/C++
Topic: qtcreator: memory overflow in text box (PlainTextEdit) ? [solved]
Replies: 14
Views: 514

Re: qtcreator: memory overflow in text box (PlainTextEdit) ? [solved]

Yes you can do it there, but its property can also be set is in qtcreator's form editor which will automatically set it in the window's ui_setupUi() , I've just tried it... aah yes, I was looking for sth like that (like I'm used to in Borland C++ Builder's object inspector) - I didn't find it becau...
by dsyleixa123
Sun Oct 06, 2019 7:00 pm
Forum: C/C++
Topic: qtcreator: how to write in a text frame widget by the program? [solved]
Replies: 12
Views: 481

Re: qtcreator: how to write in a text frame widget by the program?

IIUC, there are only relative move actions (up, down, left, right,...), no absolute (x,y) for (rownumber, linenumber)
(enum QTextCursor::MoveOperation)
by dsyleixa123
Sun Oct 06, 2019 10:24 am
Forum: C/C++
Topic: qtcreator: memory overflow in text box (PlainTextEdit) ? [solved]
Replies: 14
Views: 514

Re: qtcreator: memory overflow in text box (PlainTextEdit) ?

back to topic: As to the text box overflow (this topic), that is really an issue currently because in that case it comes to data/memory overflow as actually expected, so I need to clean up the first lines of the text box repeatedly - but how to do that? Or have anoter mobitor box instead? You can li...
by dsyleixa123
Sun Oct 06, 2019 10:04 am
Forum: C/C++
Topic: qtcreator: memory overflow in text box (PlainTextEdit) ? [solved]
Replies: 14
Views: 514

Re: qtcreator: memory overflow in text box (PlainTextEdit) ?

edited because of Heater-off-topic posts
by dsyleixa123
Sun Oct 06, 2019 9:59 am
Forum: C/C++
Topic: qtcreator: memory overflow in text box (PlainTextEdit) ? [solved]
Replies: 14
Views: 514

Re: qtcreator: memory overflow in text box (PlainTextEdit) ?

@Heater: which part of this is not the place for postings about pthread or Qthread, so your post is off-topic. as stated, the pthread topic is this one, in order to keep this topic clean please post over there about multithreading: https://www.raspberrypi.org/forums/viewtopic.php?f=33&t=253453&sid=1...
by dsyleixa123
Sun Oct 06, 2019 7:59 am
Forum: C/C++
Topic: qtcreator: using pthread instead of QThread
Replies: 2
Views: 310

Re: qtcreator: using pthread instead of QThread

update: back to my pthread blink loop thread function: volatile bool TASKS_ACTIVE = true; pthread_t thread0; void* loop(void*) { while(TASKS_ACTIVE ) { // blink loop digitalWrite(25, HIGH); delay(500); digitalWrite(25, LOW); delay(500); } return NULL; // } // *SNIP* // start function as a pthread th...
by dsyleixa123
Sun Oct 06, 2019 7:51 am
Forum: C/C++
Topic: qtcreator: memory overflow in text box (PlainTextEdit) ? [solved]
Replies: 14
Views: 514

Re: qtcreator: memory overflow in text box (PlainTextEdit) ?

edited because of Heater-off-topic posts

Go to advanced search