Re: [beagleboard] Weird Problem using GPIOs on BBB

2016-07-14 Thread William Hermans
You're welcome. If you have more questions just ask. On Thu, Jul 14, 2016 at 9:11 PM, Raul Piper wrote: > Hello William, > Thankyou very much for jotting down all the relevant example amidst your > busy schedule.I am really grateful to you.I will check this.This example

Re: [beagleboard] Weird Problem using GPIOs on BBB

2016-07-14 Thread Raul Piper
Hello William, Thankyou very much for jotting down all the relevant example amidst your busy schedule.I am really grateful to you.I will check this.This example looks far simpler to me. Rgds, Rp On Friday, July 15, 2016 at 2:26:00 AM UTC+5:30, William Hermans wrote: > > By the way. I'm not

Re: [beagleboard] Weird Problem using GPIOs on BBB

2016-07-14 Thread William Hermans
By the way. I'm not familiar with the C++ fstream object. But this person is not doing any error checking . . . On Thu, Jul 14, 2016 at 1:48 PM, William Hermans wrote: > Ok turns out I do not have to write an example. After a quick google > search I found a very good simple

Re: [beagleboard] Weird Problem using GPIOs on BBB

2016-07-14 Thread William Hermans
Ok turns out I do not have to write an example. After a quick google search I found a very good simple example on stackoverflow: http://stackoverflow.com/questions/21198933/how-to-control-beaglebone-gpio-pins So. . . this is a very good example that shows how one would, or could wrap the gpio

Re: [beagleboard] Weird Problem using GPIOs on BBB

2016-07-14 Thread William Hermans
OK, I'm still a little busy, but I should have something example wise in a couple hours. On Thu, Jul 14, 2016 at 1:00 AM, William Hermans wrote: > You only need to toggle gpio ? How fast do you need it to be ? That code > is far to complex, and uses threading, as well as

Re: [beagleboard] Weird Problem using GPIOs on BBB

2016-07-14 Thread William Hermans
You only need to toggle gpio ? How fast do you need it to be ? That code is far to complex, and uses threading, as well as callbacks for some odd reason. Threaded code can have performance overhead, and callbacks can cause problems on the stack if you're not careful. You would be better off

Re: [beagleboard] Weird Problem using GPIOs on BBB

2016-07-13 Thread Raul Piper
Attached. One is the cpp code and other is the bash script. cpp code uses the GPIO class from the attached GPIO.7z . On Thursday, July 14, 2016 at 9:50:45 AM UTC+5:30, William Hermans wrote: > > Let's put it this way. No code, no help . . . > > On Wed, Jul 13, 2016 at 9:19 PM, William Hermans

Re: [beagleboard] Weird Problem using GPIOs on BBB

2016-07-13 Thread William Hermans
Let's put it this way. No code, no help . . . On Wed, Jul 13, 2016 at 9:19 PM, William Hermans wrote: > > #code2 > //create an instance of gpio41 > //set direction as OUT > //set value as 1 > usleep(10); > //set value 0 > > Output : Toggle doesnt happens > > Whats this ?

Re: [beagleboard] Weird Problem using GPIOs on BBB

2016-07-13 Thread William Hermans
#code2 //create an instance of gpio41 //set direction as OUT //set value as 1 usleep(10); //set value 0 Output : Toggle doesnt happens Whats this ? This is not code. At best it's comments, and usleep(). On Wed, Jul 13, 2016 at 9:02 PM, Raulp wrote: > OK let em

Re: [beagleboard] Weird Problem using GPIOs on BBB

2016-07-13 Thread Raulp
OK let em explain a bit more : #code 1 sudo echo 41 > export cd gpio41 sudo chmod 666 direction sudo chmod 666 value sudo echo out > direction sudo echo 1 > value sleep 1 sudo echo 0 > value Output : Toggle on the GPIO 41 #code2 //create an instance of gpio41 //set direction as OUT //set

Re: [beagleboard] Weird Problem using GPIOs on BBB

2016-07-13 Thread William Hermans
> > When I try to do the same using a user space C application I dont get the > expected response.I am running this app as sudo'er and I have > oscilloscope'd the timings of HIGH/LOW levels of the GPIOs and compared it > with that of the manually writing procedure of GPIOS. The waveform and the >

[beagleboard] Weird Problem using GPIOs on BBB

2016-07-13 Thread Raulp
I have interfaced a hardware using the 5 Gpios on BBB.I can talk to this device using GPIOs by manually (echoing 0 and 1 to the GPIOS) writing to it in the sys/class/gpio directory by first exporting the Gpios and configuring their directions and value.It works perfectly fine. But, When I try