Jump to content

Recommended Posts

Posted

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.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines