Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4762

Interfacing (DSI, CSI, I2C, etc.) • Re: control GPIO and websockets

$
0
0
example node code using pinctrl set 21 op dh to set GPIO21 high:

Code:

const { exec } = require('node:child_process');exec('pinctrl set 21 op dh', (error, stdout, stderr) => {  if (error) {    console.error(`exec error: ${error}`);    return;  }  console.log(`stdout: ${stdout}`);  console.error(`stderr: ${stderr}`);});

Statistics: Posted by neilgl — Tue Mar 26, 2024 7:42 pm



Viewing all articles
Browse latest Browse all 4762

Trending Articles