-
Notifications
You must be signed in to change notification settings - Fork 9
Home
- Surely as the United Kingdom is now planning to use (mostly) South African developed modular and easily deployed and extended, Nuclear Pebble Bed technology (PBMR), they should reciprocate and make their closely guarded Pico 2 stepping A4's also available here.
For more news about the UK's modular reactors read here, and note the South African PBMR contribution - such as represented by X-energy’s Chief Scientist Eben Mulder and X-energy’s Vice President (Reactor Development) Martin van Staden
- Pico 2's (old stepping A2) have been acquired from the local Pishop.co.za as soon a they were first released here in August 2024.
Note that the Touch Macro Pad code presented below works fine for a Pico 2 (A2), provided the touch frequency is set to below 2.5MHz and setting it to 1 MHz or even 250kHz works fine. Translating the Pico 1 RTC code into TimeLib.h code has been completed. I am patiently waiting for Pico 2 stepping A4's to be available in my country to test whether the touch frequency can be increased.
It would have been really nice - and it would be the optimal (Note A4) business decision - for Raspberry Pi to withdraw all old stepping A2 Pico 2's from their re-sellers and replace them with the new Pico 2 stepping A4's. At the rate our local supplier is now depleting their A2 Pico 2 stock levels it could be YEARS before an updated Pico 2 can be ordered.

RP2350A and RP2350B Stepping A4's are available from almost everywhere except South Africa such as ThePiHut, Pimoroni, and JLCPD.
Note A4 They can even be re-worked there, fitted with RP2350 A4 chips, and sold at a premium to cover the additional costs.
- Power Automate Desktop SendKeys: Read here
PowerAutomateDesktopSendKeys.zip
-
1 million nKeys macros: This is a very large number of macros to select and configure. At 1000 macros per day (for example for a 10 hour working day it is 100 macros per hour), it will take three years to configure 1 million macros.
-
Caps-Num-Scroll-Lock handling: An interlock was added to this that solves the occasional freezing (note 1), of the TouchPad when booting with a simultaneous change in the state Caps-Num-Scroll-Lock keys. Note 1: Windows 11 does not handle the Caps-Scroll-Lock callback correctly (Linux Debian/Ubuntu/Mint and Windows 10 do), and the freezing referred to is as a result of this. Also see Detect OS using CapsNumScroll Lock.
-
Large Text file processing for nKeys: Can now handle very large text strings strings, preferably stored on SDCard, using nKeys n,o,p,q,r. If nKeys = m,s,t then large strings also enabled for M S T keys 01 - 96. Large strings tested up to 64kB. Keys MST 01-24 are best used for text<200 char and MST 25-96 for large text or use all NKeys NOPQR etc 01-96 for large text. For example copy two large (>10kB) files L1 and S12 on SDCard. Then program nKey n01 with content L1. Use KeyBrd editor with n01 as source in brown not white and add L1[Sav]. Test by pressing key nKey [n01]. Change nKey letter to S with [Cfg][Opt]PadKey[o] then press nKey [S12] - tested both keys both with notepad as the focus.
/////////////////////////////////////
int DoLargeFile(const char *STRf)
/////////////////////////////////////
{ int n, s, dTime = 5, nStrLen = 0;
File f;
if (LayerAxD) if (SDFS.exists(STRf)) f = SDFS.open(STRf, "r"); else return 0;
if (!LayerAxD) if (LittleFS.exists(STRf)) f = LittleFS.open(STRf, "r"); else return 0;
nStrLen = f.size(); if (nStrLen<ByteSize) dTime = 10;
while( f.position() < f.size() ) { s = f.readBytes((char *)MacroBuff, sizeof(MacroBuff)); delay(dTime);
n = 0; while (MacroBuff[n]!=0) { usb_hid.keyboardPress(HIDKbrd, MacroBuff[n]); delay(dTime);
usb_hid.keyboardRelease(HIDKbrd); delay(dTime);
n++; if (n>=s) break; }
}
f.close();
return nStrLen;
}
-
Added *Code processing for nKeys: For example with Source p01 construct *bb*7 in the KeyBrd Editor and press [Sav] (not [EXE] that will execute the star command) A file p01 will be saved with a length of 6 - press [Lst] to list the contents which is 2A 62 62 2A 37 00. Press the key [p01] which will set the normal LCD rightness to level 7.
-
nKeys are similar to a combination of symbolic links in Linux and shortcuts in Windows - as both are redirected files the latter is the term that is used to describe nKeys. As the 24 K1-K24 Link keys used to chain macros, textfiles, nKeys, and *codes in a sequence, are also referred to as "links", using the term (symbolic) links for the nKeys, could be confusing.
Add the code below to void DoNKeys(int Button):
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Check for special commands Start with * eg *ab*n n = 0-9 - ignore * codes if double **
// For example with Source p01 construct *bb*7 in the KeyBrd Editor and press [Sav] (not [EXE] that will execute the star command)
// A file p01 will be saved with a length of 6 - press [Lst] to list the contents which is 2A 62 62 2A 37 00. Press the key [p01]
// which will set the normal LCD rightness to level 7
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
if ((nFile[0]==0x2A)&&(nFile[1]!=0x2A))
{for (n = 0; n < StrLen-1; n++) KeyBrdByte[n] = nFile[n]; KeyBrdByteNum = StrLen;
if (SendBytesStarCodes()) return; else status("*Code incorrect"); return; }
if ((nFile[0]==0x2A)&&(nFile[1]==0x2A)) { for (n = 0; n < StrLen; n++) nFile[n] = nFile[n+1]; StrLen--; }
Also corrected position of check for m s t a k in DoNKeys().
////////////////////////////////////////////////////////// Test if 1sr char is m,s,t,a,k or M,S,T,A,K then handle as macro/text file
// For example with Source m01 construct GUIx in the KeyBrd Editor and press [EXE] then [Up] key to save. A file m01 will be saved
// with a length of 3 - press [Lst] to list the contents which is E3 1B 00. Exit the KeyBrd and then press [Cfg][ and then press [Opt]
// until the nKeys character choice shows - press the option Pad [o] until m shows as the nKey character press [L2][L3][L4] and then
// key [M01] and the Windows Menu will open. Press [L1] thn press Pad [n] and then press nKey [m01] and the Windows Menu will also
// open.
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// which will set the normal LCD rightness to level 7
a = NKeysX[Button][0]; strcpy(MSTAName, NKeysX[Button]);
for (n=0; n<10; n++) if (a==MacroChar[n]) { if (MacroKeys(c, 3)) return; } // mstak-MSTAK files is macro/string
- ST7789 LCD Macropad and TFT_eSP V2.5.43 fix: Recommended fix: Replace line 52 in the file Processors/TFT_eSPI_RP2040.h with the line as below:
// Processor specific code used by SPI bus transaction begin/end_tft_write functions
#define SET_BUS_WRITE_MODE spi_set_format(SPI_X, 8, (spi_cpol_t)(TFT_SPI_MODE >> 1), (spi_cpha_t)(TFT_SPI_MODE & 0x1), SPI_MSB_FIRST)
// Old line
//#define SET_BUS_READ_MODE spi_set_format(SPI_X, 8, (spi_cpol_t)0, (spi_cpha_t)0, SPI_MSB_FIRST)
// New line see https://github.com/Bodmer/TFT_eSPI/discussions/3561
#define SET_BUS_READ_MODE spi_set_format(SPI_X, 8, (spi_cpol_t)(TFT_SPI_MODE >> 1), (spi_cpha_t)(TFT_SPI_MODE & 0x1), SPI_MSB_FIRST)
Also see: https://github.com/Bodmer/TFT_eSPI/issues/3684
So I checked the differences between the two versions of the code.
And I found in TFT_eSPI_RP2040.h
// version 2.5.34
#define SET_BUS_READ_MODE // spi_set_format(SPI_X, 8, (spi_cpol_t)0, (spi_cpha_t)0, SPI_MSB_FIRST)
// version version 2.5.43
#define SET_BUS_READ_MODE spi_set_format(SPI_X, 8, (spi_cpol_t)0, (spi_cpha_t)0, SPI_MSB_FIRST)
So I change this macro to version 2.5.34, that is commenting out spi_set_format, the code works fine now.
I found using #define RP2040_PIO_SPI macro in User_setup.h also works fine without changing this macro.
Also try adding: #define TFT_SPI_MODE SPI_MODE0 to TFT_eSPI.h refer to:
https://github.com/Bodmer/TFT_eSPI/issues/3564
It seems that the problem with the black screen depends on this option:
// Some ST7789 boards do not work with Mode 0
#ifndef TFT_SPI_MODE
#if defined(ST7789_DRIVER) || defined(ST7789_2_DRIVER)
#define TFT_SPI_MODE SPI_MODE3
#else
#define TFT_SPI_MODE SPI_MODE0
#endif
#endif
The display works only if SPI_MODE0 mode is selected
Newer fixes: Use the 3files or 2files fix when using TFT_eSPI-Bodmer version 2.5.43 and also read this
Working2Files.zip WorkingFiles3Files.zip
Old fix: To obtain a working Touch-Macropad for the the Waveshare IPS ST7789 LCD Pico Board 320x240 2.8 inch using Bodmer TFT_eSPI version 2.5.43 replace the file Processors/TFT_eSPI_RP2040.h with the same file from the previous version V2.5.34.
Also see the comment Bodmer/TFT_eSPI/issues/3476: For file TFT_eSPI_RP2040.h
Replace:
2.5.43 #define SET_BUS_READ_MODE spi_set_format(SPI_X, 8, (spi_cpol_t)0, (spi_cpha_t)0, SPI_MSB_FIRST)
With:
2.5.34 #define SET_BUS_READ_MODE // spi_set_format(SPI_X, 8, (spi_cpol_t)0, (spi_cpha_t)0, SPI_MSB_FIRST)
-
Choosing an LCD Touch Display: Of the 5 different LCD displays tested here, with the firmware as presented, my favourite for the Pico 1 is the fast Waveshare 3.5 inch Type C 125MHz LCD display (even though it is not an IPS screen). It is available here.
or here.
-
Elgato Stream Deck XL: Whilst a picture may paint a thousand words it is also true that a thousand pictures may need a thousand words - when choosing between many icons you do need labels - try to guess what pressing the keys in the picture below will do - the 6th top row launches a SpaceX rocket and the 6th bottom row aborts the launch? (Dijkstra: A picture may be worth a thousand words, a formula is worth a thousand pictures.)
- Win11 24H2 new icon-bar with labels is good! - but you do not need icons here - they could have used buttons labelled Cut-Copy-Rename-Delete.
Old Win11 22H2:
New Win11 24H2:
Feb 2025: Enabling SDIO operation for SD SDIO support is available thanks to SdFat implementing a PIO-based SDIO controller. This mode can significantly increase IO performance to SD cards but it requires that all 4 DAT0..DAT3 lines to be wired to the Pico (most SD breakout boards only provide 1-but SPI mode of operation). To enable SDIO mode, simply specify the SD_CLK, SD_CMD, and SD_DAT0 GPIO pins. The clock and command pins can be any GPIO (not limited to legal SPI pins). The DAT0 pin can be any GPIO with remaining DAT1…3 pins consecutively connected. SD.begin(RP_CLK_GPIO, RP_CMD_GPIO, RP_DAT0_GPIO);
Oct 2024: Test SDIO for RP2040/RP2350 by Bill Greimann
July 2024: The Pico Evaluation Board was was modified by adding 3 connecting wires to convert the SDCard SDIO interface to a standard 1-bit SD interface. Remove pins GP5 GP18 GP19 from the Pico MCU male header. Then use the female Pico SMD header connections on the display board to connect the three wires as indicated below:
D3 CS GP22 stay as is
CLK GP5 disconnect from Pico and connect to GP10 SPI-1 CLK
CMD GP18 disconnect from Pico and connect to GP11 SPI-1 MOSI
D0 GP19 disconnect from Pico and connect to GP12 SPI-1 MISO
As an alternative implement SPI using PIO is also a solution - three sources that I know of: (1) PioSpiTest.zip available here
(2) PIO-SPI the code is in the drivers/sdcard subdirectory - based on the comments here
(3) PIOSpi - Arduino spi driver over PIO to enable SPI over any GPIO
June 2024: From the description here, which is also applicable to the Waveshare Eval Board, this can be made to have a functional SDCard using PIO SDIO:
You'll have to modify the PIO code:
You need SDIO_CLK offset from D0 by -14, which is 18 in mod32 arithmetic.
(19 + 18) % 32 = 5
In rp2040_sdio.pio you'll need to change this line:
.define PUBLIC SDIO_CLK_PIN_D0_OFFSET 30 ; (-2 in mod32 arithmetic)
to
.define PUBLIC SDIO_CLK_PIN_D0_OFFSET 18 ; (-14 in mod32 arithmetic)
Store a collection of PC editable macro definitions or music files or picture files on the SDCard and then have the Pico read it on power-up. This Waveshare IPS ST7789 LCD Pico Board 320x240 2.8 inch hardwired the LCD, Touch controller and SDCard to SPI-1 which makes the SDCard usable. But this Waveshare IPS ILI9488 Pico Evaluation Board Touch LCD 480x320 3.5 inch has the SDCard hardwired to SDIO pins which are not in the correct sequence for the current PIO drivers. The RPi SDK example is a wip (https://github.com/raspberrypi/pico-extras/tree/master/src/rp2_common/pico_sd_card)
Sep 2022: There is an implementation for the RP2040 here: https://github.com/ZuluSCSI/ZuluSCSI-firmware/tree/main/lib/ZuluSCSI_platform_RP2040 Also see here: https://forums.raspberrypi.com/viewtopic.php?t=337143 https://forums.raspberrypi.com/viewtopic.php?t=356274 https://forums.raspberrypi.com/viewtopic.php?t=361335&start=50
And this could be a solution: https://github.com/carlk3/no-OS-FatFS-SD-SDIO-SPI-RPi-Pico or https://github.com/carlk3/no-OS-FatFS-SD-SPI-RPi-Pico/tree/sdio - D0 to D3 are offset correctly (each D0 + 1) but SDIO-CLK is not at the required D0 - 2 offset.
There is a note that "For SDIO, data lines D0 - D3 must be on consecutive GPIOs, with D0 being the lowest numbered GPIO. Furthermore, the CMD signal must be on GPIO D0 GPIO number - 2, modulo 32. (This can be changed in the PIO code.)"
Similarly at Visrealm it notes: Six GPIOs for signal pins, and, optionally, another for CD (Card Detect). Four pins must be at fixed offsets from D0 (which itself can be anywhere): CLK_gpio = D0_gpio - 2. D1_gpio = D0_gpio + 1; D2_gpio = D0_gpio + 2; D3_gpio = D0_gpio + 3;