查看“Microduino-WiFi Controls LED”的源代码
←
Microduino-WiFi Controls LED
跳转至:
导航
、
搜索
因为以下原因,您没有权限编辑本页:
您所请求的操作仅限于该用户组的用户使用:
用户
您可以查看与复制此页面的源代码。
{| style="width: 800px;" |- | ==Purpose== This course will show you how to use Microduino to make a device controlling LED lights, which adopts json transmission by wifi. ==Equipment== {|class="wikitable" |- |Module||Number||Function |- |[[Microduino-Core]]||1||Core board |- |[[Microduino-USBTTL]] ||1||Program download |- |[[Microduino-WiFi]] ||1||Wireless transmission |} *Other equipment {|class="wikitable" |- |220 Ω resistor|2 |- |Jumper wire||One box |- |LED light||2 cable |- |micro usb cable||One |} ==Schematic== [[File:wifiContorlLEDSchematic.png|600px|center|thumb]] ==Program== [https://github.com/Microduino/Microduino_Tutorials/blob/master/Microduino_Advanced_Tutorial/MicroduinoWiFiControl wifiConrol] ==Debugging== Step 1: Build the circuit according to the schematic, just like: [[File:wifiContorlLED1.png|600px|center|thumb]] Step 2: Download the code and run Microduino_led_wifi code in Microduino. In this case, if there is still compile error, it should be lack of Adafruit_CC3000: [[https://github.com/wasdpkj/libraries/tree/master/_03_Microduino_WIFI_CC3000 _03_Microduino_WIFI_CC3000]] After installing the missing library function, it should go well. Before that, please modify user name and code of wifi. [[File:wifiContorlLED1_1.png|600px|center|thumb]] If everything goes fine, your IDE serial communication will show IP address such as: [[File:wifiContorlLED2.png|600px|center|thumb]] From the picture above, we can see Microduino Wifi connection goes normally. Step 3:Next, you need to configure your laptop to be a server which can run PHP code. Because, here we use is PHP code. Windows operating system *W-windows *A-apache *M-mysql *P-php Linux operating system: *L-linux *A-apache *M-mysql *P-php Mac OS: *M-Mac OS *A-apache *M-mysql *P-php Here we use is windows operating system: Official website:http://www.wampserver.com/en/ Please download and install. Download address of this site: [[File:wampServer.rar]] During the installation, it will probably give you notices such as the lack of msvcr110.dll. That’s because components are missing in your windows system, which please check: [[http://www.microsoft.com/en-us/download/details.aspx?id=30679 Visual C++ Redistributable for Visual Studio 2012 Update 4]], download and install. [[File:wifiContorlLED3.png|600px|center|thumb]] msvcr110.dll download address of this site:[[File:Msvcr110.rar]] After installation, you will see the following under your installation directory. [[File:wifiContorlLED4.png|600px|center|thumb]] Open your browser and input “localhost” The picture below shows wampserver installation success: [[File:wifiContorlLED4_1.jpg|600px|center|thumb]] Step 4: Find the file “update_state.php” in your download code folder, then change the IP address of the socket connection to that of Microduino: [[File:wifiContorlLED5.png|600px|center|thumb]] Put MicroduinoWiFiControl folder into “www” folder and input the browser website: http://localhost/MicroduinoWiFiControl/robot.html Display: [[File:wifiContorlLED6.png|600px|center|thumb]] Make sure your Microduino is powered on at this time and click the buttons and see what happens to the LED lights. Step 5: You can use any terminal control besides controlling LED lights, such as your phone: [[File:wifiContorlLED7.png|600px|center|thumb]] Input your IP address in your phone to visit webpage interface. If your visit is restricted, it means that you have set limited visit for other computer in LAN during initialzed installation of wampserver. Below is the solution: Find the file of httpd.conf in wamp folder, which is in wamp\bin\apache\apache2.4.9\conf Find statements as follows: <source lang="cpp"> # onlineoffline tag - don't remove Require local </source> Replace them to be: <source lang="cpp"> # onlineoffline tag - don't remove # Require local Require all granted </source> (Note: Don’t delete “Require local”) ==Result== You can now control LED lights through a phone or browser. [[File:wifiContorlLED8.png|600px|center|thumb]] [[File:wifiContorlLED9.png|600px|center|thumb]] ==Video== http://v.youku.com/v_show/id_XODMyNDg4MDgw.html |}
返回至
Microduino-WiFi Controls LED
。
导航菜单
个人工具
创建账户
登录
名字空间
页面
讨论
变种
视图
阅读
查看源代码
查看历史
更多
搜索
Welcome
首页
创客大赛
大赛详情
3D打印
安装月球车
图形化编程
操控月球车
升级月球车
编程工具下载
软件下载
Arduino
Processing
Mixly
Scratch
模块套件
Microduino 102
mCookie 102
mCookie 202
mCookie 302
IBC
其他
应用套件
四轴飞行器
平衡车
小车CUBE
音乐播放器
刷卡音乐播放器
wifi气象站
彩虹音乐触摸灯
分贝检测仪
迎门汇报
LED点阵时钟
LED点阵屏幕
硬件
mCookie
Sensor
Microduino
MicroWrt
MicroNux
MicroRobot-Core
MicroRobot-CoreESP
ideaBoard
ideaBox
MicroMV
MicroAI
帮助
常见问题
帮助
工具
链入页面
相关更改
特殊页面
页面信息