More information...

root@gumstix-custom-verdex:~$ echo "GPIO out" > /proc/gpio/GPIO39
root@gumstix-custom-verdex:~$ cat /proc/gpio/GPIO39
39 GPIO out set
root@gumstix-custom-verdex:~$ echo clear > /proc/gpio/GPIO39
root@gumstix-custom-verdex:~$ cat /proc/gpio/GPIO39
39 GPIO out clear
root@gumstix-custom-verdex:~$ echo set > /proc/gpio/GPIO39  
root@gumstix-custom-verdex:~$ cat /proc/gpio/GPIO39
39 GPIO out set

root@gumstix-custom-verdex:~$ echo "GPIO out" > /proc/gpio/GPIO34
root@gumstix-custom-verdex:~$ echo set > /proc/gpio/GPIO34
root@gumstix-custom-verdex:~$ cat /proc/gpio/GPIO34
34 GPIO out set
root@gumstix-custom-verdex:~$ echo clear > /proc/gpio/GPIO34
root@gumstix-custom-verdex:~$ cat /proc/gpio/GPIO34
34 GPIO out set

root@gumstix-custom-verdex:~$ echo clear > /proc/gpio/GPIO34
root@gumstix-custom-verdex:~$ cat /proc/gpio/GPIO34
34 GPIO out set
root@gumstix-custom-verdex:~$

Why I cant control that GPIO?!

On Wed, Dec 10, 2008 at 12:12 AM, Linus Casassa <linus@lin.cl> wrote:
> Doesn't work for GPIO 34 but it does for GPIO 39
>
> I have notice in /etc/inittab the line:
> S:2345:respawn:/sbin/getty 115200 ttyS0 vt100
> So I change it to:
> S:234:respawn:/sbin/getty 115200 ttyS0 vt100
> I changes make effect when I did:
> init 4; init5.
>
> But still there is no control on GPIO 34... :/
>
> On Tue, Dec 9, 2008 at 5:13 PM, Chris Dollar <chris.dollar@gmail.com> wrote:
>> I think you need to split up your commands. First you need to set the
>> pin to be a GPIO instead of AF (which is FFUART serial) and then do
>> the set/clear command. So it would be like this:
>> echo "GPIO out" > /proc/gpio/GPIO39
>> echo clear > /proc/gpio/GPIO39
>> echo set > /proc/gpio/GPIO39
>> ... and so on.
>>
>> Chris
>>
>> On Tue, Dec 9, 2008 at 12:58 PM, Linus Casassa <linus@lin.cl> wrote:
>>> I have seen the signals in the oscilloscope and the GPIO 34 doesn't work.
>>>
>>> The commands I have used:
>>> root@gumstix-custom-verdex:~$ echo \"GPIO out clear\" >/proc/gpio/GPIO39
>>> root@gumstix-custom-verdex:~$ echo \"GPIO out set\" >/proc/gpio/GPIO39
>>> root@gumstix-custom-verdex:~$ echo \"GPIO out clear\" >/proc/gpio/GPIO34
>>> root@gumstix-custom-verdex:~$ echo \"GPIO out set\" >/proc/gpio/GPIO34
>>>
>>> GPIO34 and GPIO39 are also FFUART.
>>> So how can I use GPIO 34 as an input/ouput and not a serial. How can I
>>> turn off ttyS0?
>>>
>>> -----------
>>>
>>> The FFUART (for Full-Function UART) serves as the default Linux
>>> console on the Gumstix, and supports rates of up to 230kbaud. It is
>>> exposed on nearly all 60-pin expansion boards.
>>>
>>> The Gumstix Linux kernel maps the FFUART to /dev/ttyS0.
>>> link: http://docwiki.gumstix.org/index.php/Gumstix_UARTs#FFUART
>>>
>>> Thanks
>>>
>>> On Tue, Dec 9, 2008 at 7:06 AM, Harry J Mason <hjm03r@ecs.soton.ac.uk> wrote:
>>>> On Mon, 8 Dec 2008, Linus Casassa wrote:
>>>>
>>>>> I connected a sht15 to the gumstix on the gumstix port in the robostix.
>>>>> GPIO 39 and 34.
>>>>
>>>> The SHT15 has a different pinout to the SHT75 I used; check the datasheet
>>>> carefully.
>>>>
>>>>> And I commented the GND VDD part in the main function:
>>>>
>>>> Are you providing 3.3v power some other way? No idea if it will work if the
>>>> power is 5v and the data 3.3v.
>>>>
>>>>> The I compiled and run and I got error 4:
>>>>>
>>>>> root@gumstix-custom-verdex:~$ rayabot-sht15
>>>>> temp: 65280 humi: 65280
>>>>> Got error 4
>>>>> temp: 65280 humi: 65280
>>>>> Got error 4
>>>>> temp: 65280 humi: 65280
>>>>> Got error 4
>>>>> temp: 65280 humi: 65280
>>>>> Got error 4
>>>>>
>>>>> If I disconect the sensor and run again the program it returns the same
>>>>> error.
>>>>>
>>>>> So I am guesing that the read and write of the GPIO are not working...
>>>>
>>>> "Error 4" means it tried to read 4 bytes and got an error (1 bit) every
>>>> time.
>>>> This happens when the data pin is always high on reading. When this happened
>>>> to
>>>> me it was because the sensor wasn't connected properly, so the input was
>>>> always
>>>> 1 due to the pullup resistor.
>>>>
>>>> You should be able to increase all the delays everywhere in the code without
>>>> affecting the logic. Stick a scope or meter on the pins and see if it makes
>>>> sense. If the clock and data levels change, it's likely to be a hardware
>>>> rather
>>>> than software problem.
>>>>
>>>> --
>>>> |  Harry Mason  | .------------. |    .___,    |"Whatever you do will be |
>>>> | University of | |  hjm200 @  | | ___('v')___ | insignificant. However, |
>>>> |  Southampton  | | zepler.net | | `"-\._./-"' | it is vitally important |
>>>> |    England    | '------------' | hjm ^ ^     | that you do it." Gandhi |
>>>>
>>>
>>>
>>>
>>> --
>>> Linus Casassa
>>> Estudiante Ingeniería Civil Electrónica
>>> Fono: 56-9-97776941
>>>
>>> ------------------------------------------------------------------------------
>>> SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
>>> The future of the web can't happen without you.  Join us at MIX09 to help
>>> pave the way to the Next Web now. Learn more and register at
>>> http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
>>> _______________________________________________
>>> gumstix-users mailing list
>>> gumstix-users@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/gumstix-users
>>>
>>
>> ------------------------------------------------------------------------------
>> SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
>> The future of the web can't happen without you.  Join us at MIX09 to help
>> pave the way to the Next Web now. Learn more and register at
>> http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
>> _______________________________________________
>> gumstix-users mailing list
>> gumstix-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/gumstix-users
>>
>
>
>
> --
> Linus Casassa
> Estudiante Ingeniería Civil Electrónica
> Fono: 56-9-97776941
>



--
Linus Casassa
Estudiante Ingeniería Civil Electrónica
Fono: 56-9-97776941