Go to advanced search

by markkuk
Fri Sep 16, 2022 11:55 am
Forum: C/C++
Topic: Beginner would like some IDE advice
Replies: 29
Views: 1336

Re: Beginner would like some IDE advice

The IDE functionality of VSCode is based on extensions. Install the C++ and CMake Tools extensions, create a new empty directory for your project and run the CMake: Quick Start command in VSCode. See: https://code.visualstudio.com/docs/cpp/CMake-linux
by markkuk
Mon Sep 12, 2022 8:26 am
Forum: Python
Topic: Error in applying Python Scope Rule.
Replies: 2
Views: 244

Re: Error in applying Python Scope Rule.

Global variable x is not in scope inside a function definition unless you specifically bring it in scope using the global statement.

Code: Select all

x = 10
def foo():
    global x
    x += 1
    print x
See: https://docs.python.org/3/reference/exe ... n-of-names
by markkuk
Thu Jul 21, 2022 8:27 am
Forum: SDK
Topic: C++ STL vs Pico Library
Replies: 11
Views: 716

Re: C++ STL vs Pico Library

you're completely wrong, they are also available via ESP-Arduino and Arduino IDE. Everything that is available in ESP-IDF is also available when you are using Arduino on ESP. The implementation of thread functionality is in ESP-IDF. But for Pico they simply were (are) not available. That doesn't me...
by markkuk
Thu Jul 21, 2022 8:04 am
Forum: SDK
Topic: C++ STL vs Pico Library
Replies: 11
Views: 716

Re: C++ STL vs Pico Library

[OT] I also don't ever use the native Espressif (ESP-IDF) API, I only use the ESP-Arduino-C++ API which additionally provides std::thread etc [/OT] The pthreads and std::thread support libraries on ESP32 are part of ESP-IDF, not the Arduino API. https://docs.espressif.com/projects/esp-idf/en/latest...
by markkuk
Sat Jul 09, 2022 8:50 pm
Forum: Advanced users
Topic: What Does This ppstest Output Mean?
Replies: 9
Views: 442

Re: What Does This ppstest Output Mean?

Alex_Landherr wrote:
Sat Jul 09, 2022 7:21 pm
How would I know if it is ahead or behind "true" time?
Ppstest doesn't tell you anything about that. If you are running ntpd (syncronized with the pps signal), use ntptime to get an estimate of the magnitude of the error.
by markkuk
Tue Jun 14, 2022 9:46 am
Forum: General discussion
Topic: Where can I find the display architecture of raspberry pi 4B
Replies: 9
Views: 409

Re: Where can I find the display architecture of raspberry pi 4B

sunlihong wrote:
Tue Jun 14, 2022 9:08 am
Thanks for you quick reply. Where can I find this xorg.?
X.org: https://www.x.org/wiki/
by markkuk
Sat Apr 16, 2022 8:53 am
Forum: Beginners
Topic: Docker with 2 Internet connections
Replies: 8
Views: 442

Re: Docker with 2 Internet connections

Eth0 and wlan0 must have different IP addresses and you should know which address belongs to which interface (hint: ip address show). Use the address of the interface you want to bind to in the docker command line.
by markkuk
Sun Mar 20, 2022 10:27 am
Forum: General discussion
Topic: How to set desktop to solid color - no picture at all?
Replies: 11
Views: 597

Re: How to set desktop to solid color - no picture at all?

This works for me:
In Appearance settings, Desktop tab choose Layout: No image.
The desktop background is now filled with solid color chosen in "Colour".
by markkuk
Sun Mar 20, 2022 8:21 am
Forum: Python
Topic: datetime help
Replies: 3
Views: 243

Re: datetime help

You can call the weekday() function directly using the current_date object, you don't need any conversions: import datetime from datetime import date #Create date_list to properly formate current date date_list=[] #add current date to date_list date_list.append(datetime.date.today()) #Create variabl...
by markkuk
Sat Mar 19, 2022 8:01 am
Forum: General
Topic: Can't get Pico up and Running in Linux Lite or Windows.
Replies: 10
Views: 953

Re: Can't get Pico up and Running in Linux Lite or Windows.

Linux Lite appears to be based on Ubuntu 20.04LTS, which provides Thonny version 3.2.7. You need at least version 3.3.3 for Pi Pico support. Try downloading and installing the latest version from https://thonny.org/
by markkuk
Tue Mar 15, 2022 6:39 am
Forum: General discussion
Topic: Using Adafruit's Neopixels from Rpi4/Python3
Replies: 2
Views: 215

Re: Using Adafruit's Neopixels from Rpi4/Python3

but it seems to indicate that I need to install something called CircuitPython first which seems to implement some "light" version of python or something that I do not want to be using. The instructions are a little general and, well, I'm a little confused. You don't install actual Circui...
by markkuk
Sat Feb 12, 2022 1:10 pm
Forum: C/C++
Topic: C/C++ and library documentation available?
Replies: 5
Views: 609

Re: C/C++ and library documentation available?

- Does pico C/C++ adhere to some standard version? (say C99 or C11 for the C part and C++11 or C++17 for the C++ part) This depends on the compiler. GCC 10 is the current GNU Arm Embedded Toolchain compiler and it defaults to C17/C++14 with GNU extensions https://gcc.gnu.org/onlinedocs/gcc-10.2.0/g...
by markkuk
Thu Jan 20, 2022 9:35 am
Forum: C/C++
Topic: pthread prios, main() prio
Replies: 12
Views: 4376

Re: pthread prios, main() prio

Get the thread ID of the main thread by calling pthread_self(), and then you can change its policy and priority with pthread_setschedparam(). For example: sched_param param; int res; param.sched_priority = 50 res = pthread_setschedparam(pthread_self(), SCHED_RR, &param); if (res != 0) { fprintf(...
by markkuk
Wed Jan 19, 2022 10:26 pm
Forum: C/C++
Topic: pthread prios, main() prio
Replies: 12
Views: 4376

Re: pthread prios, main() prio

By default, main() runs with SCHED_OTHER policy and priority 0. The allowed priorities for SCHED_RR are from 1 to 99 because SCHED_RR threads are considederd real-time and have higher priority than any "regular" threads. Type the following command in your Pi command line for more info: man...
by markkuk
Wed Dec 29, 2021 9:11 am
Forum: Beginners
Topic: 2nd pi IP
Replies: 6
Views: 294

Re: 2nd pi IP

Affleck001 wrote:
Wed Dec 29, 2021 12:52 am
i try to connect pi2 through IP address it states "this site cannot be reached"
What program are you using while trying to connect? SSH? VNC? Something else?
by markkuk
Wed Dec 22, 2021 7:37 am
Forum: Beginners
Topic: Adding an RS232 connection to the PI
Replies: 24
Views: 713

Re: Adding an RS232 connection to the PI

The best option is to use the package included in the Raspberry Pi OS:

Code: Select all

sudo apt update
sudo apt install python3-serial
by markkuk
Thu Dec 16, 2021 8:30 pm
Forum: General
Topic: How to include pico-sdk in Qt
Replies: 11
Views: 998

Re: How to include pico-sdk in Qt

Visual Studio Code is the recommended IDE, but you could use any text editor you like and build with command line tools.
by markkuk
Thu Dec 16, 2021 10:48 am
Forum: General discussion
Topic: Qt newer version needed
Replies: 6
Views: 730

Re: Qt newer version needed

john77 wrote:
Thu Dec 16, 2021 10:43 am
So how do I upgrade to 5.15.2?
Upgrade your OS to the current version: viewtopic.php?t=323279
by markkuk
Thu Dec 16, 2021 10:23 am
Forum: General discussion
Topic: Qt newer version needed
Replies: 6
Views: 730

Re: Qt newer version needed

Raspberry Pi OS 11 (Bullseye) has Qt 5.15.2. Both 5.11 and 5.15 are newer versions than 5.2. If you want 6.2, the instructions for building from source are here: https://wiki.qt.io/Building_Qt_6_from_Git
by markkuk
Thu Dec 16, 2021 10:05 am
Forum: General
Topic: How to include pico-sdk in Qt
Replies: 11
Views: 998

Re: How to include pico-sdk in Qt

by markkuk
Sat Dec 04, 2021 9:07 pm
Forum: Beginners
Topic: Using two Pi's on a home network
Replies: 12
Views: 813

Re: Using two Pi's on a home network

tomhusband wrote:
Sat Dec 04, 2021 8:53 pm
OK thanks, I'm struggling to find a way of doing that in my MicroTik router but I'll sort it out sooner or later.
Hostname is changed on the Pi using the raspi-config command, not on the router.
by markkuk
Tue Nov 16, 2021 1:55 pm
Forum: Networking and servers
Topic: Connect to MySQL database stored on the raspberry pi
Replies: 14
Views: 694

Re: Connect to MySQL database stored on the raspberry pi

First the server (DB) is sitting on my desktop. I will go into daily to check things out. The only time I will access this DB is when I'm sitting in front of my computer. How many machines are involved in this example? Is "the server" the same machine as "my computer"? Is the we...
by markkuk
Sat Nov 06, 2021 9:44 am
Forum: Networking and servers
Topic: Mail Server
Replies: 14
Views: 1093

Re: Mail Server

#2: Find the source code and recompile on the Pi.
#3: I've used Webmin occasionally, but not on a Pi. It may be useful for people who like web-based interfaces, but I prefer edititing the config files directly.
by markkuk
Sat Oct 30, 2021 12:23 pm
Forum: Python
Topic: Python error
Replies: 6
Views: 343

Re: Newbie

Python language is case-sensitive just like most others programming languages. The module is called "RPi.GPIO", notice the small "i" in RPi. Function names start with a small letter (following the standard Python converntion), for example GPIO.setmode(), GPIO.setup() and GPIO.out...

Go to advanced search