Go to advanced search

by itsisme
Mon Oct 24, 2016 2:08 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: sample i2c ina219 code?
Replies: 2
Views: 1145

Re: sample i2c ina219 code?

Hai All,

Anyone managed to get a C code for this sensor ?
I just actvated one sensor with a Python library but would like to test a C code also to check its performance.

Rgds ..

http://pi.gids.nl:81/temp/gauges.php
by itsisme
Sat Oct 01, 2016 1:55 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: accessing i2c address greater than 127 in pi2 using python
Replies: 21
Views: 3931

Re: accessing i2c address greater than 127 in pi2 using pyth

I am running it with the code from : https://github.com/takagi/am2321 Its weird as the I2C address is not shown often... However runnig it with watch : ( watch -n 2 i2cdetect -y 1 ) Every 2.0s: i2cdetect -y 1 Sat Oct 1 15:49:52 2016 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- -- -- -- -- -- -...
by itsisme
Sat Sep 17, 2016 12:50 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Measuring current with INA219
Replies: 10
Views: 4078

Re: Measuring current with INA219

Hai All,

Did someone ever managed to get / make a C code tool for this sensor ?
Would be interested in that.

Chrs..
by itsisme
Tue Jul 22, 2014 11:09 pm
Forum: Automation, sensing and robotics
Topic: Fast ADC with MCP3208
Replies: 69
Views: 23916

Re: Fast ADC with MCP3208

Hi Gordon, I found the issue it was related to the clock speed only... duh... #define SPI_SPEED 100000 Used here : if(wiringPiSPISetup(SPI_CHANNEL, SPI_SPEED) == -1) I could safely go up to 750000 but 1000000 was to much and that influenced the readout a lot. Maybe breadboard issue or bad chip (I ha...
by itsisme
Mon Jul 21, 2014 10:12 pm
Forum: Automation, sensing and robotics
Topic: Fast ADC with MCP3208
Replies: 69
Views: 23916

Re: Fast ADC with MCP3208

It keeps giving me the wrong readout. I guess theer must be another item not corresponding to the proper setting but I am lost in where to look. With the new codeI now get: adc0 Value = 1239 Voltage = 0.977 adc1 Value = 0006 Voltage = 0.005 adc2 Value = 0010 Voltage = 0.008 adc3 Value = 0007 Voltage...
by itsisme
Mon Jul 21, 2014 6:11 pm
Forum: Automation, sensing and robotics
Topic: Fast ADC with MCP3208
Replies: 69
Views: 23916

Re: Fast ADC with MCP3208

Had to make some alterations and it compiles well now but giving: MCP3208 channel output. adc0 Value = 0000 Voltage = 0.000 adc1 Value = 0000 Voltage = 0.000 adc2 Value = 0000 Voltage = 0.000 adc3 Value = 0000 Voltage = 0.000 adc4 Value = 0003 Voltage = 0.002 adc5 Value = 0002 Voltage = 0.002 adc6 V...
by itsisme
Mon Jul 21, 2014 5:49 pm
Forum: Automation, sensing and robotics
Topic: Fast ADC with MCP3208
Replies: 69
Views: 23916

Re: Fast ADC with MCP3208

Thanks but how to get that into my code as this is a bit out of my league... I tried to set the code as you buff[1] = 0x0F & buff[1]; // adcValue = ( buff[1] << 8) | buff[2]; adcValue = (buff [0] & 0x03) << 10 | buff [1] << 2 | (buff [2] >> 6) & 0x03 ; But that provides also readouts for the grounde...
by itsisme
Mon Jul 21, 2014 5:28 pm
Forum: Automation, sensing and robotics
Topic: Fast ADC with MCP3208
Replies: 69
Views: 23916

Re: Fast ADC with MCP3208

Hai Gordon,

So you mean rem out :
// pinMode(CS_MCP3208, OUTPUT);

Tried it but after running the Python code it reads 0 again (reload spi_bcm2708) and it worked again (However also value to low compared to the Python output)

Chrs
by itsisme
Mon Jul 21, 2014 5:07 pm
Forum: Automation, sensing and robotics
Topic: Fast ADC with MCP3208
Replies: 69
Views: 23916

Re: Fast ADC with MCP3208

It is on the link as in the post..... but for the lazy ones hi.... C code /* * Save as spi-test.c * Compile with: gcc -o spi-test spi-test.c -lwiringPi * * If no value: * rmmod spi_bcm2708 * modprobe spi_bcm2708 * * http://www.icbanq.com/pbloger/board_View.aspx?number=269 * http://www.raspberrypi.or...
by itsisme
Mon Jul 21, 2014 3:20 pm
Forum: Automation, sensing and robotics
Topic: Fast ADC with MCP3208
Replies: 69
Views: 23916

Re: Fast ADC with MCP3208

I am strugling with the MCP3208 together with my RPi and was hoping someone could help me out. My setup is described at: http://pi.gids.nl:81/adc I get readouts. However the Python scripts and C code provide different values so I am lost.... also the voltage is a bit of using the Python code. With t...
by itsisme
Sun Jun 29, 2014 10:17 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: I2C with Adafruit 128x32 I2C OLED
Replies: 30
Views: 12757

Re: I2C with Adafruit 128x32 I2C OLED

Just took me some more hacking but got the idea now...

Not the nicest way but working now it just needs to be cleaned a bit more.

Chrs..
by itsisme
Sun Jun 29, 2014 3:59 pm
Forum: Cases
Topic: ABS Pi Case with OLED & camera
Replies: 11
Views: 6185

Re: ABS Pi Case with OLED & camera

Hello John,

In your post you mention :

sudo /home/pi/source/oled/bin/Release/oled " " "$count"

I am looking for a tool to display text on my OLED display 128x64 or to be used in a bash script and it looks like this one might be usable. Could you share your code ?

Rgds ...
by itsisme
Sun Jun 29, 2014 2:14 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: I2C with Adafruit 128x32 I2C OLED
Replies: 30
Views: 12757

Re: I2C with Adafruit 128x32 I2C OLED

Hai Mike, See post from : by JPB-HK » Sat Dec 29, 2012 2:00 am it has an attachment. But no further instructions. I have an Oled display that I want to use on my respberry pi (I2C it has 4 connections vcc gnd sda and scl and pops up under adsress 0x3d on my rpi...) But now how to get it to work... I...
by itsisme
Sun Jun 29, 2014 1:15 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: I2C with Adafruit 128x32 I2C OLED
Replies: 30
Views: 12757

Re: I2C with Adafruit 128x32 I2C OLED

Hello,

I just received my oled from Ebay and trying to get it all compiled.
What is the command to compile it from the 128x32i2c.tar.gz file.

My Oled is an I2C one..

Hope to get some reply so I can use the module...

Chrs..
by itsisme
Sat Oct 26, 2013 12:00 am
Forum: General discussion
Topic: BH1750FVI
Replies: 5
Views: 8578

Re: BH1750FVI

Thanks guys for the updates now my module is working perfect....

Chrs
by itsisme
Tue Sep 24, 2013 9:05 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Tutorial: Add a Real Time Clock to the Raspberry Pi
Replies: 113
Views: 108155

Re: Tutorial: Add a Real Time Clock to the Raspberry Pi

Hello, Recently I added a ds1307 from ebay and all is looking good its reported with i2cdetect -y 1 see http://pi.gids.nl:81/temp/i2c.php However I can not get it to run hwclock -r that reports hwclock: Warning: unrecognized third line in adjtime file (Expected: `UTC' or `LOCAL' or nothing.) hwclock...
by itsisme
Sun Mar 24, 2013 11:59 am
Forum: General discussion
Topic: BH1750FVI
Replies: 5
Views: 8578

Re: BH1750FVI

Something like this but then for the Raspberry V2: /* Sample code for the BH1750 Light sensor website:www.elecrow.com Connection: VCC-5v GND-GND SCL-SCL(analog pin 5) SDA-SDA(analog pin 4) ADD-NC or GND */ #include <Wire.h> //BH1750 IIC Mode #include <math.h> int BH1750address = 0x23; //setting i2c ...
by itsisme
Fri Mar 22, 2013 5:03 pm
Forum: General discussion
Topic: BH1750FVI
Replies: 5
Views: 8578

BH1750FVI

Hello, Does anyone have some C code (or python) to read out a BH1750FVI light sensor. I have one and I would like to be able to read it properly. I found some Arduino code but that uses another I2C library. Code like for the BMP085 would be nice as seen here: http://www.raspberrypi.org/phpBB3/viewto...
by itsisme
Sun Mar 10, 2013 8:41 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: C Code for using BMP085 with Raspberry Pi
Replies: 9
Views: 13884

Re: C Code for using BMP085 with Raspberry Pi

Indeed that worked fine... Now for the altitude thats way off on my tool: Temperature 17.4 C Pressure 1003.24 hPa Altitude 122.0 Meter I noticed on th ewebsite some calculations with correction but how to adapt this: // // http://forums.netduino.com/index.php?/topic/578-bosch-bmp085-digital-pressure...
by itsisme
Sat Mar 09, 2013 2:22 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: C Code for using BMP085 with Raspberry Pi
Replies: 9
Views: 13884

Re: C Code for using BMP085 with Raspberry Pi

Hello, I am running a RPi V2 what should I change exactly due to the changed I2C (0 -> 1)? I have it compiled (no errors) but runing it provides no info: root@pi:~/projects/BMP085# ./testBMP085 root@pi:~/projects/BMP085# The python script works fine.. But I would like to see if I can get the correct...

Go to advanced search