Hi there,
Keep in mind the Xiao outputs are active LOW. so you ay need to invert your logic?
and the XIao is SLAVE so it 's SS needs to be input, right?
pinMode(D6, INPUT_PULLUP); // /WP
//pinMode(D7, INPUT_PULLUP); // /HOLD
pinMode(SS_SPI0, OUTPUT); // CS for flash
digitalWrite(SS_SPI0, HIGH); // <-- Set CS pin HIGH to deselect
pinMode(buttonPin, INPUT_PULLDOWN); // initialize the pushbutton pin as an input: for GROVE PB
from this example, it is a little confusing and is a reverse logic, see comments
So close You are…LOL
HTH
GL PJ