Shop OBEX P1 Docs P2 Docs Learn Events
Anyone used BH1750FVI light sensor with Basic Stamp? — Parallax Forums

Anyone used BH1750FVI light sensor with Basic Stamp?

CuriousOneCuriousOne Posts: 931
edited 2013-12-02 04:48 in Accessories
Hello.

Got this sensor from ebay and want to use it with BS2P. Anyone have the sample code?

Comments

  • kwinnkwinn Posts: 8,697
    edited 2013-11-27 11:12
    Don't have any sample code but you might want to look at this (http://embedded-lab.com/blog/?p=7558) arduino light meter project to get an idea of the code requirement.
  • Mike GreenMike Green Posts: 23,101
    edited 2013-11-27 12:58
    There was a thread on the PICAXE forum about this sensor. This sensor is designed to use a supply voltage of 3.0V, but will work at 3.3V as well according to the datasheet. The Stamps are designed to work at 5V. If you're not really really careful hooking the sensor up to the Stamp, you'll destroy the sensor. In particular, if you use a pullup to 5V or if the Stamp's I/O pins for I2C get accidentally set to high, that'll put 5V on the sensor's SDA and SCL pins and destroy it in an instant. Best bet would be to use a 5V to 3.3V interface like those sold by SparkFun.
  • CuriousOneCuriousOne Posts: 931
    edited 2013-12-01 06:46
    Yes, I bought these sensors already soldered to DIP-8 PCB, with onboard stepdown regulator for power supply.
  • CuriousOneCuriousOne Posts: 931
    edited 2013-12-02 04:48
    Reading "basic stamp syntax and reference manual" for I2C, it appears to be much more complicated interface to work, than SPI. Found the PICAXE tread about this: http://www.picaxeforum.co.uk/showthread.php?23436-Anyone-used-a-BH1750BVI-light-sensor-with-a-Picaxe

    Now trying out to figure, how to translate PICAXE syntax into BASIC STAMP syntax.
Sign In or Register to comment.