MyInternetSucks
Posts: 3
Joined: Fri May 26, 2017 2:54 pm

Can data be sent through GPIO?

Fri May 26, 2017 3:01 pm

When programming with Raspberry Pi say you're using a sensor, uh, for example, a rain gauge! If you got that rain gauge off of a random website would you still be able to use it with the Raspberry Pi? Also, like some sensors have their own modules what about if it doesn't have it's own? How does it return data through the GPIO port stuff?


User avatar
Burngate
Posts: 6044
Joined: Thu Sep 29, 2011 4:34 pm
Location: Berkshire UK Tralfamadore
Contact: Website

Re: Can data be sent through GPIO?

Fri May 26, 2017 5:25 pm

The rain gauge (or any other sensor) will output its data through an interface its designers thought most useful.
If you know - or can find out - what that interface that is, you can program the Pi to accept that and use the data.

You may find that it uses one of the more common interfaces - I2C, SPI, etc. in which case it may just be a case of plugging it in.
Or it may be in analogue form, in which case you'll need something to convert analogue to digital.
Or it may be something else entirely. The more information you can find about the particular sensor the easier it will be to connect it.

MyInternetSucks
Posts: 3
Joined: Fri May 26, 2017 2:54 pm

Re: Can data be sent through GPIO?

Sat May 27, 2017 2:16 am

Burngate wrote:The rain gauge (or any other sensor) will output its data through an interface its designers thought most useful.
If you know - or can find out - what that interface that is, you can program the Pi to accept that and use the data.

You may find that it uses one of the more common interfaces - I2C, SPI, etc. in which case it may just be a case of plugging it in.
Or it may be in analog form, in which case you'll need something to convert analog to digital.
Or it may be something else entirely. The more information you can find about the particular sensor the easier it will be to connect it.
Say you had a product such as https://www.adafruit.com/product/1733 I notice that it says analog in the title, is this still compatible with the Raspberry Pi? If so how do you convert analog data to digital data?

tpylkko
Posts: 382
Joined: Tue Oct 14, 2014 5:21 pm

Re: Can data be sent through GPIO?

Sat May 27, 2017 6:44 am

MyInternetSucks wrote:
Burngate wrote:The rain gauge (or any other sensor) will output its data through an interface its designers thought most useful.
If you know - or can find out - what that interface that is, you can program the Pi to accept that and use the data.

You may find that it uses one of the more common interfaces - I2C, SPI, etc. in which case it may just be a case of plugging it in.
Or it may be in analog form, in which case you'll need something to convert analog to digital.
Or it may be something else entirely. The more information you can find about the particular sensor the easier it will be to connect it.
Say you had a product such as https://www.adafruit.com/product/1733 I notice that it says analog in the title, is this still compatible with the Raspberry Pi? If so how do you convert analog data to digital data?
Have a look at the link posted by joan especially under 'Analogue Inputs'

Return to “Beginners”