Ks0183 keyestudio Multi-purpose Shield V1: Difference between revisions

From Keyestudio Wiki
Jump to navigation Jump to search
No edit summary
 
(16 intermediate revisions by the same user not shown)
Line 1: Line 1:
==keyestudio Multi-purpose Shield V1==
<br>[[File:ks0183.png|500px|frameless|thumb]]<br>


[[image:ks0183.png|thumb|600px|right|Keyestudio Multi-purpose Shield V1]]
<br>
==Introduction==
==Introduction==
Multi-purpose Shield V1 is a learning board based on Arduino. No need for soldering and connection. Download directly the program to complete experiment. It is multi-purpose and we offer code libraries of all modules that have been tested. You can use them directly. There are extended ports on the shield to help you to complete other experiment. <br>
Multi-purpose Shield V1 is a learning board based on Arduino. No need for soldering and connection.Download the program to complete experiment. <br>
 
It is multi-purpose and we offer code libraries of all modules that have been tested. You can use them directly. <br>
<br>[[File:KS0183 (2).jpg|500px|frameless|thumb]]<br>
There are extension ports on the shield to help you to complete other experiments.<br>


<br>
==Specification==
==Specification==
* Compatible with main controller on the market,such as UNO R3 and MEGA2560  
* Compatible with main controllers such as UNO R3 and MEGA2560.
* Using two-channel LED indicator to show the working condition of program for modulating program conveniently 
* Comes with 2 LED indicators to show the program status.
* Completing external interrupt experiment by two-channel keyswitch
* Comes with 2 switches for external interrupt experiment.
* One reset button
* Comes with a reset button
* Measuring temperature and humidity with DHT11 temperature and humidity sensor module
* Comes with DHT11 sensor for measuring temperature and humidity.
* Using revolving potentiometer to do analog input
* Comes with a potentiometer for analog input
* Alarming and making sound by passive buzzer module
* Comes with a passive buzzer for alarm.
* Full-color LED
* Comes with a full-color RGB LED
* Utilizing photovaristor to detect the brightness of light
* Comes with a photocell to detect the brightness of light
* Do temperature measuring experiment with LM35D temperature sensor
* Comes with LM35D temperature sensor
* Detecting infrared receiving by infrared receiver
* Comes with an infrared receiver
* 2-channel digital port(D7、D8)
* 2digital pins(D7 and D8)
* 1-channel analog port(A3)
* 1 analog pin(A3)
* One IIC interface
* One IIC interface
* One TTL serial port
* One TTL serial pin


==Connection Diagram==
<br>
Upload program to keyestudio UNO R3 BOARD, and plug this shield into UNO R3 BOARD.<br>
== Details ==
* '''Dimensions:''' 69mm*53mm*19mm
* '''Weight:''' 21g
<br>[[File:ks0183 Detail.png|500px|frameless|thumb]]<br>
 
<br>
== Interface Instruction ==
<br>[[File:ks0183 pinout.jpg|800px|frameless|thumb]]<br>
 
<br>
== Hookup Guide==
Simply plug the shield into [http://wiki.keyestudio.com/index.php/Ks0001_keyestudio_UNO_R3_BOARD  UNO R3 board ].
<br>[[File:ks0183-1.png|500px|frameless|thumb]]<br>
<br>[[File:ks0183-1.png|500px|frameless|thumb]]<br>


==Sample Code==
<br>


[https://drive.google.com/open?id=1uq5r1EiJnRwRkjKRFLdxZYzkREg8r6BI  Download the Libraries of IRremote and dht11  ]
==Upload the Code==
'''Note:''' Before compile the code, do remember to add the necessary libraries inside the libraries directory of [http://wiki.keyestudio.com/index.php/How_to_Download_Arduino_IDE  Arduino IDE ].<br>
You can download all the libraries from the link here: <br>
https://drive.google.com/open?id=1Fsr5NW8Ez8ziYh0jVmiviS9ldvR9NDei<br>
You can [https://drive.google.com/open?id=1UQF9_II_Y10PdQY6PQcMzXncld6LpOrW click here] to download the code or directly copy the code below.


<pre>
<pre>
Line 60: Line 77:
{
{
   Serial.begin(9600);
   Serial.begin(9600);
 
 
   irrecv.enableIRIn(); // Start the receiver
   irrecv.enableIRIn(); // Start the receiver
 
 
   attachInterrupt(0, falling0, FALLING);
   attachInterrupt(0, falling0, FALLING);
   attachInterrupt(1, falling1, FALLING);
   attachInterrupt(1, falling1, FALLING);
 
 
   pinMode(buzzer,OUTPUT);
   pinMode(buzzer,OUTPUT);
   digitalWrite(buzzer,HIGH);
   digitalWrite(buzzer,HIGH);
Line 77: Line 94:
   digitalWrite(i,LOW);     
   digitalWrite(i,LOW);     
}
}
 
 
void loop()
void loop()
{
{
Line 89: Line 106:
   Serial.println("status,  Hum(%),  Tem(C)      analog_val      light_val    lm35_val");
   Serial.println("status,  Hum(%),  Tem(C)      analog_val      light_val    lm35_val");
   DHT11();
   DHT11();
   Serial.print("         ");
   Serial.print("");
   analog();                //testing analog input
   analog();                //testing analog input
   Serial.print("           ");
   Serial.print("");
   Light();
   Light();
   Serial.print("           ");
   Serial.print("");
   LM35();
   LM35();
   Serial.println("         ");
   Serial.println("");
   delay(800);
   delay(800);
   }
   }
Line 117: Line 134:
                 Serial.print("OK        ");  
                 Serial.print("OK        ");  
                 Serial.print(DHT.humidity,1);
                 Serial.print(DHT.humidity,1);
                 Serial.print("       ");
                 Serial.print("");
                 Serial.print(DHT.temperature,1);
                 Serial.print(DHT.temperature,1);
                 break;
                 break;
Line 200: Line 217:
</pre>
</pre>


==Result==
<br>
After powering on, indicator D1 is on, TX light on the board is blinking and indicator of LED13 is always on. Press SW1 to start flowing light and buzzer, and then open serial port. You can directly detect IR receiving  without pressing buttons, the monitor displaying value. Press SW2 when opening serial port to start functions of DHT11, analog input,photosensitive device and LM35 testing,the monitor displaying value.<br>
 
If you need to test again, please close serial monitor and press reset button to repeat above steps.<br>
== Test Result==
Done uploading the code to the board, the power led 2 is normally on, open the serial monitor and set the baud rate to 9600.<br>
Aimed at the IR receiver, press the buttons on IR remote control, you should see the decoding value of button is displayed on the monitor. <br>
Do not press too long, or else appear the data error like FFFFFF. 
<br>[[File:ks0183 FF.png|700px|frameless|thumb]]<br>
<br>
If press the SW1 button, passive buzzer beeps and then RGB LED will emit the red, green and blue light in sequence. Also the red led3 and blue led 4 light up, circularly.
<br>[[File:KS0183 Connect.png|700px|frameless|thumb]]<br>
<br>
If press the SW2 button, passive buzzer stops beeping and LEDs not light.<br>
Then open the serial monitor and set the baud rate to 9600. Press the SW2 button again, the serial monitor will display the data shown below.
<br>[[File:ks0183 Display.png|700px|frameless|thumb]]<br>
<br>
'''From the data shown on the monitor, you can get the details as follows:'''<br>
* The first column is status OK. <br>
* The second column is the humidity value measured by DHT11 sensor;<br>
* The third column is the temperature value measured by DHT11 sensor;<br>
* The fourth column is the analog value measured by potentiometer, in the range of 0-1023;<br>
* The fifth column is the analog value measured by photocell. The stronger the light is, the greater the value is.<br>
* The sixth column is the analog value measured by LM35 temperature sensor, which can be used to calculate the specific temperature value.<br>
 
 
<br>
 
==Other Language ==
 
https://www.adrirobot.it/multi-purpose-shield-v1/
 


==Resources ==
==Resources ==


'''Download Address of Libraries:''' <br>
https://drive.google.com/open?id=1uq5r1EiJnRwRkjKRFLdxZYzkREg8r6BI 


'''PDF Format:''' <br>
'''Download the code and libraries :'''<br>
https://drive.google.com/open?id=1JpWm7bxEAxZNm8ZbqsUbIhkTi0n7U4bY
 
https://fs.keyestudio.com/KS0183
 
 
<br>


==Get One Now ==
==Get One Now ==
'''Official Website'''
*[https://www.keyestudio.com/free-shippingkeyestudio-multi-purpose-shield-v1-for-arduino-starter-p0139.html  '''Official Websie''']
 
*[https://www.amazon.com/KEYESTUDIO-Multi-Purpose-Shield-Arduino-MEGA2560/dp/B06XCG6N8C  SHOP ON Amazon ]
 
*[https://www.aliexpress.com/store/product/Free-shipping-keyestudio-Multi-purpose-Shield-V1-for-arduino-starter/1452162_32749716309.html?spm=2114.12010612.8148356.14.53b2276fvxHh5v    SHOP ON Aliexpress ]
 
*[https://www.ebay.com/itm/132536448864    SHOP ON eBay]


http://www.keyestudio.com/keyestudio-multi-purpose-shield-v1.html




[[Category: Shield]]
[[Category: Shield]]

Latest revision as of 15:49, 10 August 2022

Keyestudio Multi-purpose Shield V1


Introduction

Multi-purpose Shield V1 is a learning board based on Arduino. No need for soldering and connection.Download the program to complete experiment.
It is multi-purpose and we offer code libraries of all modules that have been tested. You can use them directly.
There are extension ports on the shield to help you to complete other experiments.


Specification

  • Compatible with main controllers such as UNO R3 and MEGA2560.
  • Comes with 2 LED indicators to show the program status.
  • Comes with 2 switches for external interrupt experiment.
  • Comes with a reset button
  • Comes with DHT11 sensor for measuring temperature and humidity.
  • Comes with a potentiometer for analog input
  • Comes with a passive buzzer for alarm.
  • Comes with a full-color RGB LED
  • Comes with a photocell to detect the brightness of light
  • Comes with LM35D temperature sensor
  • Comes with an infrared receiver
  • 2digital pins(D7 and D8)
  • 1 analog pin(A3)
  • One IIC interface
  • One TTL serial pin


Details

  • Dimensions: 69mm*53mm*19mm
  • Weight: 21g


thumb


Interface Instruction


thumb


Hookup Guide

Simply plug the shield into UNO R3 board .
thumb


Upload the Code

Note: Before compile the code, do remember to add the necessary libraries inside the libraries directory of Arduino IDE .
You can download all the libraries from the link here:
https://drive.google.com/open?id=1Fsr5NW8Ez8ziYh0jVmiviS9ldvR9NDei
You can click here to download the code or directly copy the code below.

#include <IRremote.h>
#include <dht11.h>
dht11 DHT;
#define DHT11_PIN 4

//buzzer pin
int buzzer = 5;

//button pins
int KEY2 = 2;
int KEY3 = 3;

//pin definition of flowing light
int led5 = 13;
int led4 = 12;
int led3 = 11;
int led2 = 10;
int led1 = 9;

int RECV_PIN = 6; //define input pin on Arduino
IRrecv irrecv(RECV_PIN);
decode_results results;

char i=0,flag=2; 
void setup ()
{
  Serial.begin(9600);

  irrecv.enableIRIn(); // Start the receiver

  attachInterrupt(0, falling0, FALLING);
  attachInterrupt(1, falling1, FALLING);

  pinMode(buzzer,OUTPUT);
  digitalWrite(buzzer,HIGH);

  pinMode(led1,OUTPUT);
  pinMode(led2,OUTPUT);
  pinMode(led3,OUTPUT); 
  pinMode(led4,OUTPUT);
  pinMode(led5,OUTPUT);
  for(char i=9;i<14;i++)
   digitalWrite(i,LOW);    
}

void loop()
{
  if(flag==0)
  {
  buzzer_();                //testing buzzer
  led_display();            //testing LED
  }
  if(flag==1)
  { 
  Serial.println("status,  Hum(%),  Tem(C)      analog_val      light_val     lm35_val");
  DHT11();
  Serial.print("");
  analog();                //testing analog input
  Serial.print("");
  Light();
  Serial.print("");
  LM35();
  Serial.println("");
  delay(800);
  }
  if(flag!=0 & flag!=1)
  {
    if (irrecv.decode(&results))
     {
       Serial.println(results.value, HEX);
       irrecv.resume(); // Receive the next value
     }  
  }
}

void DHT11()
{
int chk;
chk = DHT.read(DHT11_PIN);    // READ DATA
switch (chk)
  {
    case DHTLIB_OK:  
                Serial.print("OK        "); 
                Serial.print(DHT.humidity,1);
                Serial.print("");
                Serial.print(DHT.temperature,1);
                break;
    case DHTLIB_ERROR_CHECKSUM: 
                Serial.print("Checksum error        "); 
                break;
    case DHTLIB_ERROR_TIMEOUT: 
                Serial.print("Time out error        "); 
                break;
    default: 
                Serial.print("Unknown error         "); 
                break;
  }
}

void buzzer_(void)
{
 char i;  
 for(i=0;i<80;i++)// output a frequency sound
 { 
  digitalWrite(buzzer,LOW);// sound
  delay(1);//delay1ms 
  digitalWrite(buzzer,HIGH);//not sound
  delay(1);//ms delay 
 } 
 for(i=0;i<100;i++)// output a frequency sound
 { 
  digitalWrite(buzzer,LOW);// sound
  digitalWrite(buzzer,HIGH);//not sound
  delay(2);//2ms delay 
 }
}

void led_display()
{
 digitalWrite(led1,HIGH);
 delay(500);
 digitalWrite(led1,LOW);
 digitalWrite(led2,HIGH);
 delay(500);
 digitalWrite(led2,LOW);
 digitalWrite(led3,HIGH);
 delay(500);
 digitalWrite(led3,LOW);
 digitalWrite(led4,HIGH);
 delay(500);
 digitalWrite(led4,LOW);
 digitalWrite(led5,HIGH);
 delay(500);
 digitalWrite(led5,LOW);
}

void analog()
{
int val;
val=analogRead(A0);
Serial.print(val);
}

void Light()
{
int val;
val=analogRead(A1);
Serial.print(val);
}

void LM35()
{
int val;
val=analogRead(A2);
Serial.print(val);
}

void falling0()
{
flag=0;
}
void falling1()
{
flag=1;
}


Test Result

Done uploading the code to the board, the power led 2 is normally on, open the serial monitor and set the baud rate to 9600.
Aimed at the IR receiver, press the buttons on IR remote control, you should see the decoding value of button is displayed on the monitor.
Do not press too long, or else appear the data error like FFFFFF.
thumb

If press the SW1 button, passive buzzer beeps and then RGB LED will emit the red, green and blue light in sequence. Also the red led3 and blue led 4 light up, circularly.
thumb

If press the SW2 button, passive buzzer stops beeping and LEDs not light.
Then open the serial monitor and set the baud rate to 9600. Press the SW2 button again, the serial monitor will display the data shown below.
thumb

From the data shown on the monitor, you can get the details as follows:

  • The first column is status OK.
  • The second column is the humidity value measured by DHT11 sensor;
  • The third column is the temperature value measured by DHT11 sensor;
  • The fourth column is the analog value measured by potentiometer, in the range of 0-1023;
  • The fifth column is the analog value measured by photocell. The stronger the light is, the greater the value is.
  • The sixth column is the analog value measured by LM35 temperature sensor, which can be used to calculate the specific temperature value.



Other Language

https://www.adrirobot.it/multi-purpose-shield-v1/


Resources

Download the code and libraries :

https://fs.keyestudio.com/KS0183



Get One Now