Document directory
Fading
Hardware required
Circuit
Schematic
Code
Fading
Demonstrates the use of the analogwrite () function in fading an led off and on. analogwrite uses pulse width modulation (PWM), turning a digital pin on and off very quickly, to create a fading effect.
Hardware required
Arduino Board
Breadboard
A LED
A 220 ohm resistor
Circuit
ConnectAnode(The longer, positive leg) of your led to digital output pin 9 on your
Analogwrite (pin, value)
First follow the connection number Circuit
This time, we will use Arduino and a set of three-color lamps (red, yellow, and green) to Apply PWM. First, let's take a look at the Arduino board. There are six PWM interfaces in total, they are digital interfaces 3, 5, 6, 9, 10, and 11. For convenience, we use the continuous PWM interfaces 9, 10, and 11. During program writing, we wi
Phprpc + Ruby + Arduino = led turn-on (?) Well, I know this is a very boring sample.
For phprpc and Arduino, Google
Before reading this demo, please install the SerialPort mentioned in another article.
With another gem
KIT: phprpc
In this example, I established a server through phprpc and called some methods through rpc to control the USB serial port.In this demo, we must establish the server and client.T
Normal 0 false false false MicrosoftInternetExplorer4
Author: Alajl
Date:2011-4-15
Title:Arduino third lab-Automatic garbage removal-Accessory assembly
Original article:Http://blog.csdn.net/alajl
Preparations:
1. Arduino 328 Control Panel1
2. Four-wheel car
3.Dual DC Motor Drive
4.Sensor expansion BoardV5
5.Digital obstacle avoidance Sensor
6. Wire tracing Sensor
7. Power supply
8. Several small accessories
The role of version Serial.flush () prior to arduino1.0 is to empty the serial cache (dropping received incoming data). But after 1.0 the function of version Serial.flush () is adjusted in order to wait for the serial port data to be transmitted (Waits for the transmission of outgoing Serial data to complete.) (Referenced from http:// Arduino.cc/en/serial/flush).Because I am in the process of using Wifibee, if both want to use serial.print through the serial port to the WiFi module to send instr
1. Windows key + R, input shutdown.exe/r/o/f/t 002. The computer will restart automatically, enter the screen, select Troubleshoot(Reprint please specify original: Http://www.harleygwak.com/wp-admin/post.php?post=187action=edit)3. Select Advanced Options4. Select Startup Settings5. Click Restart6. Press F7, or press the number 7 button directly8. The computer will automatically reboot into the system, the following can be installed under the Win7 system installation of the
Source of demand1. My son finished the year 6 years old, like to play fireworks, but the courage is small, so I am responsible for ignition, from the year before 26 to the beginning of eight, every night to give his son point firecrackers ah point firecrackers.2. The new year to open the door gun and opened the gun, Lunar New Year early morning also to help mom point firecrackers, said the whole string of small firecrackers also fried too fast, every time did not run a few steps on the open, bro
This is a old Arduino 3G module bought half years ago.Its wiki:Http://wiki.iteadstudio.com/ITEAD_3G_ShieldIts mall:Http://imall.itead.cc/itead-3g-shield.htmlDatasheet for Itead 3G Shield Http://pan.baidu.com/s/1ntCH4UHSchematic for Itead 3G Shield http://pan.baidu.com/s/1pJ5lRztDemo Code for Itead 3G Shield http://pan.baidu.com/s/1gdyaCYfIts back where you insert a SIM card:This board uses at commands to control itself.Key:at commandsWhat's AT command
Problem: arduino:1.6.3 (Windows 7), board: "Arduino Pro or Pro Mini, ATmega328 (5V, MHz)" Sketch uses 846 bytes (2) of program storage space. Maximum is 30,720 bytes. Global variables use 9 bytes, (0%) of dynamic memory, and 2,039 bytes of local variables are remaining. The maximum is 2,048 bytes. AVRDUDE:STK500_RECV (): Programmer is not responding Avrdude:stk500_getsync () Attempt 1 of 10:not in Sync:resp
First Arduino default I²c address is 7-bit address, the manual is described, 7-bit address is 0x1e, read address is 0x3d = (7-bit address If you want to communicate with the hmc5883l, you need to hmc5883l power on the 5ms. Therefore, the general write configuration requires a delay of 5ms before communication. After connecting the device to test the sensor, identify the operation and identify register a, identify register B, identify register C is
Recently suddenly want to study STM32, see almost all of the tutorials are used in C-Series microcontroller program, so that has been studying C 艹 I write very not adapt to, today studied for a noon, successfully a single LED driver package into an Arduino-style class library, the use is very convenient, the method is as follows.Before you begin, it is recommended that you follow the methods described in this article in the STM32 template creation met
Arduino relatedArticleNow,
I recently bought a Bluetooth chip (bluetooth module JY-MCU) online, which is also 37 yuan cheaper
This chip uses the Bluetooth serial port service, which is encapsulated by Arduino.
That is, the connection line reads data and writes data through the serial API,ProgramCodeIt is also very simple
The only trouble is that you can write applications on your mobile phone. I
Arduino Port Code:
int red=255; Create variables to store the data to be sent
int green = 2;
int blue = 3;
void Setup ()
{
serial.begin (9600);//define a data transfer rate of 9600 bits
}
void Loop ()
{
serial.print (red);
Serial.print (",");
Serial.print (green);
Serial.print (",");
Serial.print (blue);
Serial.print ("\ n");
Delay (+);
}
Above red, Green,blue is replaced with the value obtained by the color sensor in the actual app
/* sweep*/#include Original address: http://jt.satxt.com/arduino/arduino-d-j-sg90-d-w-q-s-x-z-d-f-x-k-z.htmlArduino Servo SG90 potentiometer for rotational direction control
AM2321 is a digital temperature and humidity sensor in Guangzhou ausone electronics production. Although it is a domestic brand, its precision can be comparable with foreign mainstream temperature and humidity sensing IC.
Size: 11.3x7.8x4mm (L x W x H)
Package: 0.05 pitch PTH
Operating voltage: 2.6~5v
Interface: i²c, maximum rate 100kbps, with special timing requirements
Resolution: Temperature 0.1°c, relative humidity 0.1%rh
Accuracy: Temperature error +/-0.3°c at r
The adk Board (a board) released by Google was designed with reference to the Arduino Board (M board). Let's see what's different.
Adk
Arduino mege2560
Power Supply
Lt3480edd # PBFLP2985-33DBVR
MC33269D-5.0LP2985-33DBVR
MCU
ATMEGA2560-16AU
ATMEGA2560-16AU
USB to serial port
FT232RL-REEL
Atmega8u2
USB Host
Max3421eetj +
None
Description
Reads the value from the specified analog pin. the Arduino board contains a 6 channel (8 channels on the mini and nano, 16 on the mega), 10-bit analog to digital converter. this means that it will map input voltages between 0 and 5 volts into integer values between 0 and 1023. this yields a resolution between readings of: 5 V/1024 units or ,. 0049 Volts (4.9 mV) per unit. the input range and resolution can be changed using analogreference
SI7021 is a temperature and humidity sensor chip produced by Silicon Labs. Its main features:
Humidity accuracy: Error typ. +/-2%RH, Max +/-3%rh (0~80%RH), factory corrected
Temperature accuracy: Error typ. +/-0.3%°c, Max +/-0.4%°c ( -10°c~85°c), factory corrected
Measuring range: Temperature range 0~100%rh, maximum temperature range -40°c~125°c
Operating voltage: 1.9~3.6v
Low power consumption: Low 150μa at work, 60nA at standby
Interface: I²C, maximum rate support
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.