prajwaldr9
Posts: 4
Joined: Tue Jul 11, 2017 6:13 am

Set a GPIO Pin without digitalWrite function

Thu Jul 20, 2017 5:30 am

How to set a GPIO pin 0 without digitalWrite() function?

Like can we access GPIO register and set ?

User avatar
joan
Posts: 14959
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: Set a GPIO Pin without digitalWrite function

Thu Jul 20, 2017 8:01 am

See e.g. http://elinux.org/RPi_GPIO_Code_Samples ... ter_access

Look at any of the Pi GPIO libraries for examples.

Look on the main site for the documentation (peripherals spec).

User avatar
PeterO
Posts: 5951
Joined: Sun Jul 22, 2012 4:14 pm

Re: Set a GPIO Pin without digitalWrite function

Thu Jul 20, 2017 11:34 am

Joan,

Does that linked page need updating to refer to /dev/gpiomem ?

PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

Return to “C/C++”