Sponsor Link:

UTSource.net Reviews

It is a trustworthy website for ordering electronic components with cheap price and excellent quality.

Mounting the circuit

The hardware requirements are so little and the mounting of this circuit is so simple that it only took me a few seconds! Before starting, make sure you start with no power or any electrical current going through your Arduino microcontroller. You are now ready to start so first, you need to connect the signal pin on the TEMT6000 ambient light sensor to A0 (analog pin zero) on your Arduino board by using one of your jumper wires. Then, you need to connect the GND (-) pin of your sensor to any GND pins on the Arduino board, also, make sure you connect the positive (+) pin of your sensor to the 5v (+5 volts) pin on your Arduino board. The hardware part of this project is done, just three connections from the module and it's done. Please remember that your TEMT6000 sensor may come in different variations and pinouts such as mine, remember to not rely always on the pin order in the image, and make sure to look at which pins are connected to which before setting it up.

Arduino TEMT6000 Ambient Light Sensor Project Code

int temt6000Pin = 0;

void setup() {
  Serial.begin(9600);
}

void loop() {
  int value = analogRead(temt6000Pin);
  Serial.println(value); 
  delay(200);
}

About the code

The code consists of basic commands and functions, inclusive of everything you would need to build up a basic interface with sensors. The code starts off with declaring a pin for the variable temt6000Pin, this is set to A0 (analog zero). We now get into the setup block of the program where we get ready for the serial data communication in the loop section, where we read the data coming in to the Arduino and display it on the serial monitor. Basically, the 9600 baud rate represents the bits per second for this particular pin (A0), it sets up the serial communication. Next, we move onto the loop section where another variable, value, is declared. Now, this variable is set to receive the raw readings (0 to 1023) from the sensor. Then, the percentage we have found will be printed onto the serial monitor for us to see. This data given will be printed every 200 milliseconds. That is it for this simple, but yet short piece of code!

Amazing opportunities

Also, be sure to check out PCBWay, a leading manufacturer and distributor in PCB design and manufacturing. They have amazing prices and excellent quality in their services, so don't miss out on them! Plus, PCBWay has an amazing website, online Gerber viewer function and a gift shop so make sure to check out their links below:

PCBWay Free Online Gerber Viewer Function:  https://www.pcbway.com/project/OnlineGerberViewer.html

PCBWay Gift Shop: https://www.pcbway.com/projects/gifts.html

Make sure you check out the review for this module by clicking here.

Enjoy! Contact us for any inquiries!