Not dead yet ! My GP2D02, when diode is correctly oriented, is still working
!...
But now I can't figure out how to pass pins to function. I've read things on
jallist, like

procedure bla(volatile bit out mypin) is
...

but I get a "parameter 1 type mismatch" error.

My procedure needs two pins as parameters. One will be written, the other
will be read. I've also tried this, no success... :


function gp2d02_read_pins(bit out pin1, bit out pin2) return byte is
    -- the logic is like this
    pin1 = low
    pin1 = high
    if pin2 == high then
        -- do something
    end if
end function

var volatile bit gp2d02_vin is pin_a4
var voltatile bit gp2d02_vout is pin_a6

var byte what
what = gp2d02_read_pins(gp2d02_vin, gp2d02_vout)
-- same with gp2d02_read_pins(pin_a4,pin_a6)


And I also tried this (no success too):

function gp2d02_read_pins(bit in out pin1, bit in out pin2) return byte is
...
end function


Any hints ?

Thanks
Seb

2009/3/18 Joep Suijs <[email protected]>

>
> 2009/3/18 Sebastien Lelong <[email protected]>:
> > Yes, these things are quite expensive, widely used. I've read lots of
> things
> > showing how fragile they are (read: not fool-proof) and still show very
> low
> > and unreliable performances. I hope my MaxBotix US ranger will better (I
> > know it will).
> Well, robotics sensors are generally 'noisy' and it is a (the) major
> chalange to cope with that...
> I have some of the analog sharp sensors and an i2c compass and US
> ranger. I thought about creating libraries for them, but there is
> little to add over analog and i2c libs...
> The only added value would be a generic interface for different
> sensors. But lcd learned me that this requires a lot of work and I
> doubt it would be worth while (if it is even used at all).
>
> If only we knew who is using jallib, which libs are used most often
> and (most dificult since people tend not to know this them selfs) what
> new features would be most usefull for them...
>
> Joep
>
> >
>


-- 
Sébastien Lelong
http://www.sirloon.net
http://sirbot.org

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jallib" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/jallib?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to