Home
Crowtail- Starter Kit for Arduino Guide book
Contents
1. 12 ar av av av ar av am op rart a Ho DS z gt 02 er Gs Firmware For this application an Arduino library U8glib is needed Firstly copy the folder of U8glib to the Arduino library file Arduino libraries And then open the P09 OLED Display ino 19 g P10 OLE Display Arduino 1 0 6 File Edit Sketch Tools Help P10 OLE Display i void setup void ff flip screen if required ffug setRot130 i I void Loop void ff picture loop wig firstFagell do I dr aw KJ v g setColorIndex 11 whilel wg nextPage L 1 ff rebuild the picture after some delay Ao UL Arduino Nano w ATmega328 on COM129 There are some functions for showing something on the OLED such as the Elecrow Logo void drawLogo uint8_t d show Elecrow Logo on the OLED us8g setFont u8g_font_gdr25r u8g drawStr 8 d 30 d E u8g setFont u8g font gdr25r u8g drawStr 30 d 30 d 1 u8g setFont u8g font gdr25r u8g drawStr 40 d 30 d e u8g setFont u8g font gdr25r u8g drawStr 55 d 30 d c u8g setFont u8g_font_gdr25r u8g drawStr 70 d 30 d r u8g setFont u8g_font_gdr25r u8g drawStr 85 d 30 d 0 u8g setFont u8g_font_gdr25r u8g drawStr 100 d 30 d w And show some characters void drawURL void u8g setFont u8g font 4x6 u8g drawStr 35 54 www elecrow 20 Upload successfully You can see the OLED displays 21
2. sensor Serial print sensorValue print the results to the serial monitor if sensor Value lt 300 tone buzzer 3000 sensorValue 5 emitters voice with frequency inversely proportional to the sensor data else noTone buzzer digitalWrite buzzer LOW if not stop to make any alarm delay 200 17 Upload the program to Arduino amp Crowduino and plug the moisture sensor into soil or even a cup of water for experiment you will hear the buzzer emits different sounds with your placing the moisture sensor in amp out Lesson8 Sound light Controlled LED In our daily life you must notice that the stair light during the day when somebody up or down stair it is not work but in the night it would light up when somebody make some noise by clipping In this lesson we will simulate an intelligent switch control the light turns OFF in the day and turns ON in the night when there is somebody making some noise We will read light information from the light sensor and read sound information from the sound sensor Then set a threshold value to control the LED ON or OFF Material gt Crowtail Sound Sensor x 1 gt Crowtail Light Sensor x 1 gt Crowtail LED x1 Hardware Connection Connect the LED to D port such as D5 and the light sensor sound sensor to the A port as below sues 19011 EO rn 9 z vi uvu elecrou cos De Croutail Firmware Open the A
3. Directory Preface Getting Started EE EE 2 1 Crowtail Base Shield Introduction rrrrrnnrrnnnnnnnnrvnnnrrnnnnnnnsrrnnvrnnnnnnnssnnnsrrnnnnenssrnnnsnnnnnseee 4 2 Ca CED ee E ES E E E E A 4 3 TB 5 PN 5 5 Crowtail TOUCH Sensor sesssssseseesssssssrrrressssssrrrrsssssssrerressssssrereessssssrereessssserereesssseeeeee 5 6 Crowtail Vibration Motor rrnnrrrnnnnnnnrrnnnrrnnnnnnnsrnnnvrnnnnnnnsnnnnnvnnnnnnnnsnnnnsnnnnnsnsssnnnsnnnnnnnnssnnne 6 7 Crowtail Tilt SWitCh rrsrnnnnrnnnnnnnornnnrrrnnnnnnssnnnrrrnnnnnnssnnnnrnnnnnnnssnnnnnnnnnnsnssnnnnvnnnnnsnsssnnnsnnnn 6 EE Ge EG EE EE E A E E 6 9 Crowtail Linear Potentiometer rrrnnrrnnnnnnnnrnnnvrrnnnnnnnrrnnnrrnnnnnnnsrnnnvnnnnnesssrnnnvrnnnnensssnnnsnnnn 7 10 CROW fall Moisture SONSON Lassen enerne 7 11 Crowtail Light SN 7 12 Crowtail Sound Sensor ss sssssssssseeeresssssrerrressssssereressssssrrrressssserrreeesssserereeessseerereeess 7 13 Crowtail Thermistor Temperature SCNSOP sssccccccessseccecceesececceeeeeccesauaseceessaaaeees 8 14 EN 8 EM EN 9 Lesson2 Button Control LED scncssssasaascasatawaresadiaoansnnsaranaiadanananadienanaiadamanarabnyansieaxbanennianonidasayacnnnes 12 Lessons 010 01 FG TOUCH EEE ET 13 Lesson4 Tilt Alarml rrnarnnnrrnnnnnnnsrnnnvrnnnnnnsssnnnvrnnnnnnnssnnnnnnnnnnnsssnnnnvnnnnnnnssnnnnsnnnnnnnssnnnnsnnnnnnnee 14 Lesson5 Intelligent Temperature Control Fan rrrnrrrrnnnnnnnrrnnnnnnnnrrnnnnnnn
4. ad 0 resistance float 1023 a 10000 a get the resistance of the sensor temperature 1 log resistance 10000 B 1 298 15 273 15 convert to temperature via datasheet And if the temperature exceeds the temperature set in the program the Arduino board set a logic HIHG to the relay making the relay ON to open the Fan if temperature gt 20 digitalWrite Relay HIGH if temperature gt 20 degree turn the Relay on fan working digital Write Relay LOW if temperature lt 20 degree turn the Relay off fan not working Upload successfully You can set a threshold temperature value to control the realy ON or OFF then control the fan work or not 15 Lesson6 Linear Potentiometer Control Breathing LED Do you want to control a LED light as human breathing It means that a LED adopts PWM control to achieve the effect as a breathing light Material gt Crowtail Linear Potentiometer x 1 gt Crowtail LED x1 Hardware Connection re I Bd hi YILIHOILNILDOG Firmware Open the Arduino P06 Breathing LED ino In the function Loop Arduino get the potentiometer position and then convert the data from 071023 to 07255 with function mapf sensor Value analogRead analogInPin read the Linear Potentiometer value int gap Value map sensor Value 0 1023 0 255 remap the 0 1023 data to 0 255 And then control the lightness of LED with PWM wave the higher duty of the logic HIHG the lighter the LED would be an
5. alogWrite 0 nalogWrite 64 analogWrite 127 analogwrite 255 The PWM wave can be only generated with the some of the pins 3 5 6 9 10 11 for the Arduino Uno or Crowduino with the function analog Write analogWrite ledPin gap Value PWM control the lightness of LED Upload the program to Arduino amp Crowduino you can see the brightness of the LED changes with the linear potentiometer position Lesson7 Moisture Alarm Sometimes we are too busy to take care of our plants if there is not enough water for them they will be not so good Here we make a small project to monitor the soil moisture of the plants and then alarm you this with some different tones to show you how urgent now to give your plants some water We will use the moisture sensor to detect the soil moisture and then emits some tones to alarm you how urgent it is now to water your plants Hardware Connection Connect the moisture sensor to one of the A ports and buzzer to one of the D ports note that as we need to use the PWM wave so only the D3 5 6 9 10 11 would be work Firmware Open the Arduino P07 Moisture Buzzer ino After getting the sensor from the moisture which range from 071023 the Arduino make the buzzer emits sounds with frequency inversely proportional to the sensor data if the sensor data shows that the current soil is too dry void loop sensor Value analogRead analogInPin read the analog in value Serial print
6. ate is HIGH if buttonState HIGH turn LED on digitalWrite ledPin HIGH else turn LED off digitalWrite ledPin LOW Lesson3 Touch Touch Do you want to control a LED just by your finger touch a pad The Crowtail Touch Sensor can help you do it This sensor can detect the change in capacitance when a finger pressed or nearby that means no matter your finger directly touches the pad or just stays close to the pad your project can sense you fingers Material gt Crowtail Touch Sensor x 1 gt Crowtail LED x 1 Hardware Connection EREHE i EN i kr i a4 i Sten i cal i lt _ x AB Al A2 AZ At AS DE Open the Arduino P03 Touchsensor Control LED and download to the Arduino When your finger touches the pad the LED turns ON Otherwise the LED turns OFF You can also put some things on the sensor such as an aleck cover cardboard and try again the sensor can also sense your fingers within about 2mm distance DEF Lesson4 Tilt Alarm In this lesson we will learn how to detect the forward status and then to make an alarm with vibration if the forward is in vertical Material gt Crowtail Vibration Motor x 1 gt Crowtail Tilt Switch x 1 Hardware Connection m y v em px HDX J zZz x CURR Open the P04_Vibration_Motor ino Firstly we define the tilt switch and motor pins and variable to store the tilt swi
7. ize the digital pin as an output pinMode Qed OUTPUT I fs the loop routine runs over and over again forever void Loop digitalfrite led HIGH ff turn the LED on HIGH is the voltage level delay 1000 jf wait for a second digitalfriteQled LOW ff turn the LED off by making the voltage LOW delay 1000 jf wait for a second Arduino Uno on COMS Click Tools gt Board choose the Arduino board you are using such as the Arduino Uno 5 PO1 LED Control Arduino 1 0 5 o x File Edit Sketch Help Auto Format Ctrl T Archive Sketch Fix Encoding amp Reload P01 LED Conf iy Serial Monitor Ctrl Shift M 3 Turns on an LEI lpeatedly og ArduBlock fi Connect the LE Board gt Arduino Uno ff give it a name Serial Port gt Arduino Duemilanove w int led 5 Arduino Diecimila or Du Programmer gt Arduino Nano w ATmex usa ad Burn Bootloader ss CALG SEL 9 Arduino Nano w ATmeg Arduino Mega 2560 or I Arduino Mega ATmega W void setup l I f initialize the digital pin as an output pinMode led OUTPUT I Arduino Leonardo Arduino Esplora the loop routine runs over and over again forever Arduino Micro void Leep Arduino Mini w ATmegi digitalfrit d HIGH turn the LED on HIGH is the z d r ped Arduino Mini w ATmegi delay 1000 wait for a second Ardui Eth rduino Ethernet digitalWrite led LOW turn the LED off by making 1 delay 1000 wai
8. n electric microphone that detects the sound loudness 13 Crowtail Thermistor Temperature Sensor The Crowtail Thermistor Temperature Sensor uses a thermistor to detect the ambient temperature 14 Crowtail OLED ro Q tal v wuu elecrow com 3 92 fare Oo The Crowtail OLED is constructed with 128 x 64 dot matrix OLED module Users can display characters amp pictures on this small screen Part2 Crowtail Applications Lesson1 LED Control LED control is basic in Arduino In this lesson you can learn how to make the LED blinks and how to control the brightness Material gt ArduinoUNO x1 gt Crowtail Base Shield x 1 gt Crowtail LED x1 gt Crowtail Cable x 1 gt USB cable x1 Hardware Connection Plug the Crowtail Base Shield onto the Arduino amp Crowduino Board Firmware In this demo code firstly we defined the Pin5 as output with the pinMode function in the setup which will run once when the program start the setup routine runs once when you press reset void setup initialize the digital pin as an output pinMode led OUTPUT And then make Pin5 changes between logic HIHG and LOW with an interval of 1000ms with digitalWrite and delay function in the oop which will run repeatedly to make the LED blinks forever void loop digital Write led HIGH turn the LED on HIGH is the voltage level delay 1000 wait for a second digitalWri
9. pular accessories for DIY projects such as Breadboard Jumper wires Color Led Resistors Buzzer etc With the straight forward instructions with the kit you can easily dig into the Arduino world and start your own Arduino project 2 Arduino IDE Installation Arduino is also the name of a programming IDE based on C C After you get your Arduino you should install the IDE Depending on OS version the specific installation varies Thankfully Arduino team provides us a detailed installation guide for most OS systems http arduino cc en Guide HomePage Arduino 1 0 5 release notes hosted by Google Code Getting Started Reference Windows Installer Windows ZIP file Environment MacOSX ke Examples F Linux 32 bit 64 bi ee eee source FAQ Then connect you Arduino board to PC via USB Install the Driver and the computer will recognize the Arduino board as a COM port REE riter Mito Be ba mS EmA E ZIJOKETLAN tA con M LT aF ir uino UNO R3 OIM O a PEPO PTL O RRO Con H g ita 2 BS WOIE a RAA Ie ES Se BART SHEER a BPRS may Peace i R Rares 1 are 3 Language Reference Arduino team also provides a good and comprehensive website for you to learn http arduino cc en Reference HomePage ARDUINO Home Buy Download Products Learning Forum Support Blog Melen iy SIGN UP Reference Language Libraries Comparison Changes Language Reference Arduino p
10. rduino Code P08 Sound LightControllED ino In the firmware we define the Pins we connected and some Variable to store the data received from the sensor int lightPin AQ input pin for the light sensor int soundPin A3 input pin for the sound sensor int ledPin 5 Pin for the LED int lightValue 0 variable to store the value coming from the sensor int sound Value 0 And get the sensor data lightValue analogRead lightPin read the value from the sensor sound Value analogRead soundPin 18 If the light sensor data below the threshold we set that means it is night and if the sound sensor detects some noise then we can light up the LED if lightValue lt 800 amp amp soundValue gt 500 if in dark and some noise detected digital Write ledPin HIGH turn the LED on delay 5000 turn on the LED for 5S else digital Write ledPin LOW turn the LED off After successfully uploading the code the LED turns OFF under the lamp and the environment was be quiet The LED will be ON for 5 second only when it in darkness and some noise detected Lesson9 Display Something on the OLED Crowtail OLED is constructed from 128 x 64 dot matrix OLED module Users can display text or pictures on the OLED with simple IIC communication and the given library in Elecrow Hardware Connection Connect the OLED display to Base Shield Port I as below d i Jri 13 E i a z i 3 3 i
11. rograms can be divided in three main parts structure va ues variables and constants and functions Structure Variables Functions setup Constants Digital I O loopO HIGH I LOW pinMode Ha Fen INPUT I OUTPUT I INPUT PULLUP digitalWrite k LED BUILTIN digitalRead true false if else Analog I 0 integer constants Part 1 Modules Introduction 1 Crowtail Base Shield Introduction The Crowtail Base Shield is a standard IO expansion board for the Arduino It regulate the IOs of Arduino to the standard Crowtail interface which can be sorted into 4 kinds Analog A Digital D UART U and IIC I AG A1 A2 A3 At AS 11 Digital I O ports D2 D12 that have a mark D These ports can be used to read and control digital Crowtail modules Crowtail modules that have a mark D such as the Button and LEDs Some of the digital I O ports can also be used as PWM pulse width modulation outputs 6 Analog ports AO A5 that have a mark of A Besides the functional of digital these A ports can read the analog signal such as a potentiometer or light sensor 3 UART ports that have a mark of U These interfaces can be used for UART communication such as the Wifi module or Bluetooth module 2 IIC ports that have a mark of I These interfaces are for the IIC Communication users can utilize 2 IIC modules at the same time Besides there is also a 2x5 female connector of 5V and GND for cus
12. rrnnnnnnnnennnnnnnsrnnnnnnseeee 15 Lesson6 Linear Potentiometer Control Breathing LED rrrrrrnnnrrrnnnnnnnrrnnnnnnnrrnnnnnnnnrrnnnnnnnsene 16 LESSON 7 7 IVIGISUUNS Alal Luanda 17 Lesson8 Sound light Controlled LED rrrrrnnnnnrrnnnnnnnrrnnnnnnnrrnnnnnnnnrrnnnnnnnernnnnnnnsennnnnnsssennnnnnnsene 18 Lesson9 Display Something on the OLED r rrrnnrnnnrrrnnnnnnnrrnnnnnnnnrrnnnnnnnsrnnnnnnnssnnnnnnsssennnnnnnseee 19 Preface Getting Started Welcome to the world of Crowtail Crowtail is a modulated ready to use toolset it takes a building block approach to assembling electronics It simplifies and condenses the learning process significantly The Crowtail products are basic functional modules that consists of a Base Shield and various modules with standardized connectors each Crowtail module has its specific functions such as light sensing and temperature sensing With these Crowtail modules users do not need to deal with the mess jumper wires or debug the electronic circuits they can just plug the Crowtail modules to the base shield and then play Before we discuss those Crowtail modules one by one you need to seat yourself and finish some preparations 1 What s Arduino Arduino is a flexible and easy to learn open source development platform that enjoys great fame among makers geeks and interactive artists The Elecrow Basic Kit For Arduino helps you get the basic understanding of Arduino It contains the most po
13. t for a second Arduino Fio Arduino BT w ATmegai Arduino BT w ATmegal LilyPad Arduino USB LilyPad Arduino w ATm LilyPad Arduino w ATm Click Upload the code will be compiled and uploaded to the board The down area of IDE shows following information if download succeed Binary sketch size 1 084 bytes of a 32 256 byte maximum Arduino Uno on COR After the programming the Crowtail LED will blink with a second You can change the delay parameter in the program to change the interval Explore more Arduino functions here http www arduino cc en Reference HomePage Lesson2 Button Control LED In the lesson1 we learned how to control a LED turn on off Do you want to control it by yourself use the button In this lesson we will tell you how to realize it When the button is pressed the LED will be lighten and turn off when released Material gt Crowtail LED x 1 gt Crowtail Button x 1 Hardware Connection Open the Arduino Code P02 Button Control LED ino and upload it to Arduino board When the button is pressed the LED turns ON Otherwise the LED turns OFF Firmware In the programs the Arduino first read the status of the button with the function digitalRead read the state of the pushbutton value buttonState digitalRead buttonPin check if the pushbutton is pressed And thus to decide make the LED on or off with the function digitalWrite if it is the buttonSt
14. tch status const int tiltswitchPin 4 the number of the Tilt Switch pin const int motorPin 5 the number of the vibration motor pin int tiltswitchState 0 variable for reading the tilt switch status And define the motor as OUTPUT and tilt switch as INPUT void setup pinMode motorPin OUTPUT initialize the vibration motor pin as an output pinMode tiltswitchPin INPUT initialize the tilt switch pin as an input If the tilt switch is in vertical forwards makes the motor begin to vibrate ans wise versa void loop tiltswitchState digitalRead tiltswitchPin read the state of the tiltswitch value if it is the tiltswitchState is HIGH if tiltswitchState HIGH digitalWrite motorPin HIGH vibration motor vibrate else digitalWrite motorPin LOW turn vibration motor off Upload the program to Arduino amp Crowduino Try to rotate the tilt switch the vibration motor will vibrated or not with the forward of the tilt switch Lesson5 Intelligent Temperature Control Fan Do you want to design a fan which can automatic working when the temperature higher In this lesson we will design an intelligent temperature control fan Material gt Crowtail Thermistor Temperaturen Sensor x 1 gt Crowtail Relay x 1 gt Fanx1 Hardware Connection Firmware Open the P05 IntelligentTemperatureControlFan ino In the program the Arduino firstly detects the current temperature a analogRe
15. te led LOW turn the LED off by making the voltage LOW delay 1000 wait for a second Program downloading Download the Crowtail Starter Kit Demo Code Open the P01 LED Control ino with Arduino IDE as below PO1 LED Control Arduino 1 0 5 anmo Edit Sketch Tools Help P01_LED_Control Turns on an LED for one second then off for one second repeatedly Connect the LED to digital pin D5 ff give it a name int led 5 f f the setup routine runs once when you press reset void setup f initialize the digital pin as an output pinMode led OUTPUT I f the loop routine runs over and over again forever void loopQ ti digitaltfrite led HIGH ff turn the LED on HIGH is the voltage level delay 1000 ff wait for a second digitalfrite led LOW ff turn the LED off by making the voltage LOW delay 1000 f wait for a second I Arduino Uno on COM3 Click Tools gt SerialPort and choose the right com port which will list after the driver successfully installed 10 5 PO1_LED_Control Arduino 1 0 5 File Edit Sketch Help Auto Format Archive Sketch Fix Encoding amp Reload Serial Monitor Ctrl Shift M Turns on an LEI tpeatedly ArduBlock PO1_LED_Cont Board b Connect the LH L Serial Port gt COM3 give it a namg int led 5 Programmer b ARP Burn Bootloader the setup rouj void setup I initial
16. the panel mount design the vibration modules is easy to install or stick onto other modules to make them vibrates together with the vibration motor module 7 Crowtail Tilt Switch The Crowtail Tilt Switch is a sensor to detect the station of forwards It outputs logic LOW in Horizontal direction and logic HIGH in Vertical direction 8 Crowtail Relay TIANHU HJR 4102 L OSV ra 34 120VAC s sa 24VDC The Crowtail Relay module is a digital normally open switch Through it you can control circuit with high voltage larger current with low voltage say the 5V logic of Arduino board 9 Crowtail Linear Potentiometer The Crowtail Linear Potentiometer module incorporates a linear variable resistor with a maximum resistance of 10KN When you move the slider from one side to the other its output voltage range from 0 V to the VCC you applied 10 Crowtail Moisture Sensor This Moisture Sensor can be used to detect the moisture of soil or your pet plant s water level let the plants in your garden reach out for human help 11 Crowtail Light Sensor The Crowtail Light Sensor module incorporates a light dependent resistor LDR to detect the lightness Typically the resistance of the LDR will decrease when the ambient light intensity increase it means that the output signal from this module will be higher in bright light and lower in the dark 12 Crowtail Sound Sensor The Crowtail Sound Sensor is a
17. tomer usages Users can connect any electronic modules to the Base Shield with jumper wires easily 2 Crowtail LED The Crowtail LED is a simple LED indicator with resistor The LED would be on when 4 activated by logic HIGH and off by logic LOW It is the most common used indicator for human interfacing and the best way for users stepping into the Arduino There are 3 LED modules in the Crowtail Starter Kit with Red Yellow Green color 3 Crowtail Button The Crowtail Button is a momentary push button which rebounds on its own position after released The button outputs a logic HIGH signal when pressed and logic LOW when released 4 Crowtail Buzzer The Crowtail Buzzer module is for making sound in your project It sounds when activated by a logic HIGH signal Connect the buzzer to any of the D digital ports of Crowtail Base Shield you can easily make it sounds with setting the related ports to logic HIHG The buzzer module can be also connected to an pulse width modulation PWM output to generate various of tones 5 Crowtail Touch Sensor The Crowtail Touch sensor detects the human fingers When human finger touches or 5 nearby it reports the Arduino hey it seems someone touches me 6 Crowtail Vibration Motor The vibration modules vibrates when it activated by signal logic HIGH like the vibration of a phone This module is consist of a permanent magnet coreless DC motor With
Download Pdf Manuals
Related Search
Related Contents
警告 - ピジョン OwNERS MANuAl National Instruments PCI-6110E/6111E User's Manual catalogo fondoprofessioni_integrato Copyright © All rights reserved.
Failed to retrieve file