RE: [beagleboard] Re: 4 Relay relay Cape 'c' code

2020-04-08 Thread Shabaz Yousaf
lto:beagleboard@googlegroups.com> Subject: Re: [beagleboard] Re: 4 Relay relay Cape 'c' code shabaz, To be honest during my working carrier I only used 'C', Basic, Fortran, Cobol and bash. At this point in my life I don't really want to learn something new like Perl or Python unless I have to. My

Re: [beagleboard] Re: 4 Relay relay Cape 'c' code

2020-04-08 Thread KenUnix
shabaz, To be honest during my working carrier I only used 'C', Basic, Fortran, Cobol and bash. At this point in my life I don't really want to learn something new like Perl or Python unless I have to. My eyes are not what they used to be. Also, if you write in pure 'C' isn't it more

Re: [beagleboard] Re: 4 Relay relay Cape 'c' code

2020-04-08 Thread Shabaz Yousaf
: beagleboard@googlegroups.com on behalf of KenUnix Sent: 09 April 2020 00:32 To: BeagleBoard Subject: Re: [beagleboard] Re: 4 Relay relay Cape 'c' code Snabaz, If I want to simply control a relay 1. Tthis simple 'c' would work --Start Code-- #include #include #include #include int main

Re: [beagleboard] Re: 4 Relay relay Cape 'c' code

2020-04-08 Thread KenUnix
Snabaz, If I want to simply control a relay 1. Tthis simple 'c' would work --Start Code-- #include #include #include #include int main() { int fd = open( "/sys/class/gpio/gpio20/value", O_RDWR | O_CLOEXEC ); // Relay 1 if( fd < 0 ) { fprintf( stderr, "open: %m\n" );

Re: [beagleboard] Re: 4 Relay relay Cape 'c' code

2020-04-08 Thread Shabaz Yousaf
NY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. From: beagleboard@googlegroups.com on behalf of Mala Dies Sent: 09 April 2020 00:03 To: BeagleBoard Subject: Re: [beagleboard] Re: 4 Relay relay Cape 'c' code Hey Si

Re: [beagleboard] Re: 4 Relay relay Cape 'c' code

2020-04-08 Thread Mala Dies
------ > *From:* beagl...@googlegroups.com > on behalf of jonnymo > > *Sent:* 08 April 2020 23:00 > *To:* Beagle Board > > *Subject:* Re: [beagleboard] Re: 4 Relay relay Cape 'c' code > > Mala, > > Yeah, I have 3 variations of Molloy's books and I do find them quit

Re: [beagleboard] Re: 4 Relay relay Cape 'c' code

2020-04-08 Thread Shabaz Yousaf
automatically stagger by a few milliseconds multiple relays switching on to make it just a perceived simultaneous time. From: beagleboard@googlegroups.com on behalf of jonnymo Sent: 08 April 2020 23:00 To: Beagle Board Subject: Re: [beagleboard] Re: 4 Relay relay

Re: [beagleboard] Re: 4 Relay relay Cape 'c' code

2020-04-08 Thread jonnymo
Mala, Yeah, I have 3 variations of Molloy's books and I do find them quite nice. His code more up to date than the shabaz code, so I would prefer that. The other option is the AdaFruit BBIO Python code, which I believe Molloy uses.

Re: [beagleboard] Re: 4 Relay relay Cape 'c' code

2020-04-08 Thread Mala Dies
Hello, I am thankful that you updated me yesterday. I am waiting to try out the iobb library from shabaz soon. If you test it, let a brother know how it works out. Seth On Tuesday, April 7, 2020 at 8:01:17 PM UTC-5, KenUnix wrote: > > Jon, >> > > I'll let Seth know. > > Regarding me yes I

Re: [beagleboard] Re: 4 Relay relay Cape 'c' code

2020-04-08 Thread Mala Dies
; many register differences : ( > > > -- > *From:* beagl...@googlegroups.com > on behalf of jonnymo > > *Sent:* 08 April 2020 01:47 > *To:* Beagle Board > > *Subject:* Re: [beagleboard] Re: 4 Relay relay Cape 'c' code > > Ken, > >

Re: [beagleboard] Re: 4 Relay relay Cape 'c' code

2020-04-08 Thread Mala Dies
Hello jonnymo, Seth here. The book exploringBB has some nice source for C++ workings w/ it geared to, on Chapter 6, GPIO and other peripherals. Seth P.S. See here: https://github.com/derekmolloy/exploringBB/tree/version2/chp06. Although this was from two years ago, I am sure if we work on

Re: [beagleboard] Re: 4 Relay relay Cape 'c' code

2020-04-07 Thread KenUnix
> > Jon, > I'll let Seth know. Regarding me yes I have a BBB with a relay cape running Debian 10.3 IoT 3-26-2020 And a 4 port usb-2 powered hub and a .Realtek RTL8188EUS USB WiFi adapter. I always like tp glance at code. You never know when you will find something interesting. That's how it

Re: [beagleboard] Re: 4 Relay relay Cape 'c' code

2020-04-07 Thread Shabaz Yousaf
ort it to BB-AI, but have put it on pause for now, so many register differences : ( From: beagleboard@googlegroups.com on behalf of jonnymo Sent: 08 April 2020 01:47 To: Beagle Board Subject: Re: [beagleboard] Re: 4 Relay relay Cape 'c' code Ken, Sorry I do not h

Re: [beagleboard] Re: 4 Relay relay Cape 'c' code

2020-04-07 Thread jonnymo
Ken, Sorry I do not have a Relay board, but I have done the shell scripting thing before. Are you using a BB Black? I am curious as to what Seth/Mala comes up with though. Cheers, Jon On Tue, Apr 7, 2020 at 3:41 PM KenUnix wrote: > Jon, >> > > Thanks I will look at them. > > Did you

Re: [beagleboard] Re: 4 Relay relay Cape 'c' code

2020-04-07 Thread KenUnix
> > Jon, > Thanks I will look at them. Did you see that script I uploaded? Give it a try. 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

Re: [beagleboard] Re: 4 Relay relay Cape 'c' code

2020-04-07 Thread KenUnix
> > Seth, > Yes I am still interested. brb. Try out that script. It's kind of neat. Let me know what you think. After downloading it to a file chmod 755 filename It's actually useful cmd is the name you give the file. In my case I called it relay cmd state 115 cmd on 20 cmd off 20 cmd label

Re: [beagleboard] Re: 4 Relay relay Cape 'c' code

2020-04-07 Thread jonnymo
Is this what you are referring to? http://derekmolloy.ie/beaglebone/beaglebone-gpio-programming-on-arm-embedded-linux/ https://github.com/derekmolloy/exploringBB Jon On Tue, Apr 7, 2020 at 3:20 PM Mala Dies wrote: > Hello KenUnix, > > Seth here. Do you want me to still work on the C++ code

Re: [beagleboard] Re: 4 Relay relay Cape 'c' code

2020-04-07 Thread Mala Dies
Hello KenUnix, Seth here. Do you want me to still work on the C++ code or are you satisfied w/ the shell script you are working on currently? Seth P.S. I found my book, ideas, and everything is on chapter six w/ source already done for specific ideas. I would probably need to change some

Re: [beagleboard] Re: 4 Relay relay Cape 'c' code

2020-04-07 Thread KenUnix
Robert, You were correct high level is better for now. It's been a long while since working with 'c'. Went the way of a bash script. Works well see below. Even supports --help. ---Code Start-- #!/bin/bash # # 4-7-2020 Ken # # cmd [state|label|on|off|in|out] gpio # # Example : cmd state 112 #

[beagleboard] Re: 4 Relay relay Cape 'c' code

2020-04-07 Thread Dennis Lee Bieber
On Mon, 6 Apr 2020 20:19:49 -0700 (PDT), in gmane.comp.hardware.beagleboard.user KenUnix wrote: > int fd = open( "/sys/class/gpio/gpio112/value", O_RDWR | O_CLOEXEC ); I note you are using the low-level file descriptor calls, whereas most code I've seen make use of higher level file

Re: [beagleboard] Re: 4 Relay relay Cape 'c' code

2020-04-06 Thread jonnymo
Robert, Out of curiosity, does that require having the Relay overlay loaded or is that a default? https://github.com/beagleboard/bb.org-overlays/blob/master/src/arm/BB-RELAY-4PORT-00A0.dts Cheers, Jon On Mon, Apr 6, 2020 at 8:23 PM Robert Nelson wrote: > Your trying too hard.. > > > Turn

Re: [beagleboard] Re: 4 Relay relay Cape 'c' code

2020-04-06 Thread Robert Nelson
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 wrote: > Jon, >>

Re: [beagleboard] Re: 4 Relay relay Cape 'c' code

2020-04-06 Thread KenUnix
> > Jon, > Yes Mala I.E. Seth have exchanged messages The 'c' I tried refuses to operate relays --Start code-- #include #include #include #include int

Re: [beagleboard] Re: 4 Relay relay Cape 'c' code

2020-04-06 Thread jonnymo
I suspect this is the Relay board you have: https://beagleboard.org/capes Have you looked at? https://github.com/beagleboard/capes Mala had recently posted questions regarding this board. Have you seen this:

[beagleboard] Re: 4 Relay relay Cape 'c' code

2020-04-06 Thread Mala Dies
Hello KenUnix, Seth here. I will need to type one up. I found a book a while back on setting up GPIO pins in C/C++ (more towards C than C++). Anyway... I think I can assist in this matter. ... I think that Adafruit_BBIO and some other libraries might go extinct soon. I am not familiar