Your trying too hard..
Turn Relay 2 on: echo 1 > /sys/class/leds/relay-jp2/brightness Turn Relay 2 off: echo 0 > /sys/class/leds/relay-jp2/brightness Regards, On Mon, Apr 6, 2020, 10:20 PM KenUnix <[email protected]> wrote: > Jon, >> <https://groups.google.com/d/msgid/beagleboard/4f08bce6-61dc-4d9b-8471-b2fde68afcaf%40googlegroups.com?utm_medium=email&utm_source=footer> > > > Yes Mala I.E. Seth have exchanged messages > > The 'c' I tried refuses to operate relays > > --Start code-- > #include <fcntl.h> > #include <unistd.h> > #include <stdlib.h> > #include <stdio.h> > > int main() > { > int fd = open( "/sys/class/gpio/gpio112/value", O_RDWR | O_CLOEXEC ); > if( fd < 0 ) { > fprintf( stderr, "open: %m\n" ); > exit(1); > } > > char c = '1'; > write( fd, &c, 1 ); > close( fd ); > > return 0; > } > --End Code-- > > No errors. Just dosen't do anything > > Ken > > -- > For more options, visit http://beagleboard.org/discuss > --- > You received this message because you are subscribed to the Google Groups > "BeagleBoard" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/beagleboard/f60cd784-df33-4d87-89ac-d79b7e5a43ef%40googlegroups.com > <https://groups.google.com/d/msgid/beagleboard/f60cd784-df33-4d87-89ac-d79b7e5a43ef%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups "BeagleBoard" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/CAOCHtYgE-R0JRksFsE1XVkcXmih1HJ6RyLinif2L-tUrs9dkpA%40mail.gmail.com.
