Skip to content
View in the app

A better way to browse. Learn more.

Learn more

Port access

Featured Replies

Hi, 

We can access port usig eg.

echo 1 >/sys/class/leds/green_led/brightness  (or red_led)
echo 1 > /sys/devices/platform/gpio_sw.0/gpio_sw/PA6/data (other ports)

My question is as follows:

How to access to ports using C language ?

Is WiringOP (This method works :) ) is preferred or another method is better?

#define        LED        0
  wiringPiSetup () ;
  pinMode (LED, OUTPUT) ;
  digitalWrite (LED, HIGH) ;        // On
Guest
This topic is now closed to further replies.

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.