Kirjeldus
Electronic Brick
Yes! We can build electronics projects just as easy as piling bricks. Arduino and community have made the programming much easier than ever before. How about some elixir on hardware part? Maybe it is not yet convenient to make complex interfaces, but we can at least start from the most commonly used modules.
By using electronic bricks, you may connect Arduino compatible boards easily with various digital, analog and I2C/Uart interfaces. These the breadboard-less firm connection are prepared to extensive modules like poteniometers, sensors, relays, servos…even buttons, just plug and play.
Each terminal module has buckled port with VCC, GND and Output, which has corresponding port on the sensing board, with a plain 2.54mm dual-female cable you may start playing already. Buckled brick cables are like cement for bricks, make the connections easier, secure and more professional looking.
Overview
The Light sensor module uses the photoresistor to detect the light intensity of the environment. The resistance of the sensor decreases when the light intensity of the environment increases. The chip LM358 is used as a comparator if you want to use the digital output instead of using the analog output.
Connect the + pin to 5v and – pin to GND, S pin will output the digital value to tell you if now brighter than a fixed value, or output a analog value which referfance to the brightness. It can be used with Iteaduino directly with a 3PIN cable.
Applications Ideas
- Electronic toys
- Light-control switch
- Monitor
Programming
The program below uses the Light sensor to control the LED. As the picture shows above, the Light sensor is connected to analog port 0 and the LED is connected to port 12. The resistance of the photoresistor which stands for light value can be calculated based on the voltage obtained through the analog port. Then you can use this data to control the LED or other thing you like.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
#include "math.h" const int ledPin= 12 ; //Connect the LED electronic brick module to Iteaduino D12 const int thresholdvalue= 10 ; //The treshold for which the LED should turn on. Setting it lower will make it go on at more light, higher for more darkness void setup() { Serial.begin( 9600 ); //Start the Serial connection pinMode(ledPin,OUTPUT); //Set the LED on Digital 12 as an OUTPUT } void loop() { int sensorValue = analogRead( 0 ); float Rsensor; Rsensor=( float )( 1023 -sensorValue)* 10 /sensorValue; if (Rsensor>thresholdvalue) { digitalWrite(ledPin,HIGH); } else { digitalWrite(ledPin,LOW); } Serial.println(Rsensor,DEC); } |
Specification
Brick Type | Sensor Brick | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Brick Interface | 3PIN | ||||||||||||||
Brick Power Supply | 5V | ||||||||||||||
Board Size | 37 × 21 × 1.6mm | ||||||||||||||
Weight | 20.00g | ||||||||||||||
Model | IM120710017
Electronic BrickYes! We can build electronics projects just as easy as piling bricks. Arduino and community have made the programming much easier than ever before. How about some elixir on hardware part? Maybe it is not yet convenient to make complex interfaces, but we can at least start from the most commonly used modules. By using electronic bricks, you may connect Arduino compatible boards easily with various digital, analog and I2C/Uart interfaces. These the breadboard-less firm connection are prepared to extensive modules like poteniometers, sensors, relays, servos…even buttons, just plug and play. Each terminal module has buckled port with VCC, GND and Output, which has corresponding port on the sensing board, with a plain 2.54mm dual-female cable you may start playing already. Buckled brick cables are like cement for bricks, make the connections easier, secure and more professional looking.
OverviewThe Light sensor module uses the photoresistor to detect the light intensity of the environment. The resistance of the sensor decreases when the light intensity of the environment increases. The chip LM358 is used as a comparator if you want to use the digital output instead of using the analog output. Connect the + pin to 5v and – pin to GND, S pin will output the digital value to tell you if now brighter than a fixed value, or output a analog value which referfance to the brightness. It can be used with Iteaduino directly with a 3PIN cable.
Applications Ideas
ProgrammingThe program below uses the Light sensor to control the LED. As the picture shows above, the Light sensor is connected to analog port 0 and the LED is connected to port 12. The resistance of the photoresistor which stands for light value can be calculated based on the voltage obtained through the analog port. Then you can use this data to control the LED or other thing you like.
Specification
|
Arvustused
Tooteülevaateid veel ei ole.