Experimental Aircraft EFIS
#11
(07-15-2016, 07:15 PM)rickinca84 Wrote:
(07-15-2016, 05:41 PM)adamw Wrote:
(07-15-2016, 04:59 PM)rickinca84 Wrote: Hi, Pine is my first sbc, or microcontroller...
So I read that you have utilized temperature sensor, directly with gpio
I want to start with something simple, like a weather station : temperature/ humidity sensor
It's possible? how?
can you write a simple how to?

Well, there's a million ways to skin that cat.
The first thing you'll need to do is select your sensors.
Some use I2C...others use SPI, some are analog even.

I2C seems to be working really well on Pine, so if possible, I'd find some sensors with I2C output.
Once you've selected which sensor(s) you'll be using (I recommend using breakout boards from Adafruit or something similar to make your life easy), it should be as simple as connecting up the SDA and SCL with jumper wires.

Once you get that far, there are some simple shell commands you can run (I'm assuming you're running Linux) to verify your devices are connected properly, and to read/write data.

I choose this cause cheaper and near to me... China was an half cheaper but far far away...
http://www.ebay.it/itm/191847848197 It's a Module BME280 by bosh... or a china fake... so with this i have no need of libraries and realtime kernel, only a script, right?

Well, the interface to that module is pretty simple.
It looks like you can use either 3.3V or 5V to power that module.
Make the following connections:

Pin 1 of the PI-2 bus to VIN on your module.
Pin 9 of the PI-2 bus to GND on your module.
Pin 5 of the PI-2 bus to SCL on your module.
Pin 3 of the PI-2 bus to SDA on your module.

The pins you've used will be i2c-1 (twi1).
Then use i2cdetect to see if you've hooked things up right.
You might need to get i2c-tools.
"sudo i2cdetect -y 1"
You should see device 0x76 or 0x77 detected.

From there, just use read/write commands
#12
(07-16-2016, 09:43 AM)adamw Wrote:
(07-15-2016, 07:15 PM)rickinca84 Wrote:
(07-15-2016, 05:41 PM)adamw Wrote:
(07-15-2016, 04:59 PM)rickinca84 Wrote: Hi, Pine is my first sbc, or microcontroller...
So I read that you have utilized temperature sensor, directly with gpio
I want to start with something simple, like a weather station : temperature/ humidity sensor
It's possible? how?
can you write a simple how to?

Well, there's a million ways to skin that cat.
The first thing you'll need to do is select your sensors.
Some use I2C...others use SPI, some are analog even.

I2C seems to be working really well on Pine, so if possible, I'd find some sensors with I2C output.
Once you've selected which sensor(s) you'll be using (I recommend using breakout boards from Adafruit or something similar to make your life easy), it should be as simple as connecting up the SDA and SCL with jumper wires.

Once you get that far, there are some simple shell commands you can run (I'm assuming you're running Linux) to verify your devices are connected properly, and to read/write data.

I choose this cause cheaper and near to me... China was an half cheaper but far far away...
http://www.ebay.it/itm/191847848197 It's a Module BME280 by bosh... or a china fake... so with this i have no need of libraries and realtime kernel, only a script, right?

Well, the interface to that module is pretty simple.
It looks like you can use either 3.3V or 5V to power that module.
Make the following connections:

Pin 1 of the PI-2 bus to VIN on your module.
Pin 9 of the PI-2 bus to GND on your module.
Pin 5 of the PI-2 bus to SCL on your module.
Pin 3 of the PI-2 bus to SDA on your module.

The pins you've used will be i2c-1 (twi1).
Then use i2cdetect to see if you've hooked things up right.
You might need to get i2c-tools.
"sudo i2cdetect -y 1"
You should see device 0x76 or 0x77 detected.

From there, just use read/write commands

very very good! thank you very much... i'll do some question when module arrives.
thank you


Forum Jump:


Users browsing this thread: 1 Guest(s)