ROBOTC PROGRAMMING
TEMPUS IV Project: 158644 -JPCR Development of Regional Interdisciplinary Mechatronic Studies DRIMS
ROBOTC PROGRAMMING
TEMPUS IV Project: 158644 -JPCR Development of Regional Interdisciplinary Mechatronic Studies DRIMS
ROBOTC PROGRAMMING
TEMPUS IV Project: 158644 -JPCR Development of Regional Interdisciplinary Mechatronic Studies DRIMS
ROBOTC PROGRAMMING
TEMPUS IV Project: 158644 -JPCR Development of Regional Interdisciplinary Mechatronic Studies DRIMS
ROBOTC PROGRAMMING
Connection: Connect the sensor to Port 4 of the NXT. The sensor uses
the high-speed RS-485 line to connect with the NXT. (The sensor can only be connected to Port 4 and will not work on Ports 1-3.) Wifi networks typically come either encrypted or unencrypted. Encrypted wifi networks can be WEP *) or WPA *). In all of these examples make sure that your debug stream window is open. The window dialog between the NXT and the Wifi sensor will show up on RobotCs debug stream.
TEMPUS IV Project: 158644 -JPCR Development of Regional Interdisciplinary Mechatronic Studies DRIMS
ROBOTC PROGRAMMING
ROBOTC PROGRAMMING
initiating this, you will automatically obtain an IP after connecting to a network that is connected to the internet. Disassociate: (Optional). In case our sensor has already connected to a network, we will want to make sure it is disconnected. Keep Alive: ( Optional). After connecting to a network, the wifi sensor will disconnect after around 2 minutes if no communication occurs. (In our example, we extend the keep alive time to 10 minutes.)
TEMPUS IV Project: 158644 -JPCR Development of Regional Interdisciplinary Mechatronic Studies DRIMS
ROBOTC PROGRAMMING
*). . Note !
Wired
is a security algorithm for IEEE 802.11 wireless networks, recognizable by the key of 10 or 26 hexadecimal digits . As a part of the original 802.11 standard , WEP is widely in use and is often the first security choice presented to users by router configuration tools.
Equivalent
Privacy (WEP)
Wi-Fi Protected Access (WPA) and Wi-Fi Protected Access II (WPA2) are two
security protocols and security certification programs developed by the Wi-Fi Alliance to secure wireless computer networks. The Alliance defined these in response to serious weaknesses researchers had found in the previous system, WEP (Wired Equivalent Privacy).
TEMPUS IV Project: 158644 -JPCR Development of Regional Interdisciplinary Mechatronic Studies DRIMS
ROBOTC PROGRAMMING
*). . Note !
Pre-Shared Key or PSK is a shared secret which was previously shared between the
two parties using some secure channel before it needs to be used. To build a key from shared secret, the key derivation function should be used. Such systems almost always use symmetric key cryptographic algorithms. The term PSK is used in WiFi encryption such as WEP or WPA, where both the wireless access points (AP) and all clients share the same key. The basic service set (BSS) is the basic building block of an 802.11 wireless LAN. In infrastructure mode, a single access point (AP) together with all associated stations (STAs) is called a BSS . Extended service set- (ESS) is a set of one or more interconnected BSSs and integrated local area networks that appear as a single BSS to the logical link control layer at any station associated with one of those BSSs; Service Set IDentification (SSID)- Each ESS is identified by a service set identifier (SSID); for an BSS, the SSID is chosen by the client device that starts the network, and broadcasting of the SSID is performed in a pseudo-random order by all devices that are members of the network. The maximum length of the SSID is currently 32 bytes long.
TEMPUS IV Project: 158644 -JPCR Development of Regional Interdisciplinary Mechatronic Studies DRIMS
ROBOTC PROGRAMMING
TEMPUS IV Project: 158644 -JPCR Development of Regional Interdisciplinary Mechatronic Studies DRIMS
ROBOTC PROGRAMMING
. Note that.. !
Code files (with a .c extension) are not the only files commonly seen in programs. The other type of file is called a header file, sometimes known as an include file. Header files almost always have a .h extension. The purpose of a header file is to hold declarations for other files to use.
TEMPUS IV Project: 158644 -JPCR Development of Regional Interdisciplinary Mechatronic Studies DRIMS
ROBOTC PROGRAMMING
replace the values of SSID and WEP_KEY (when use it for own purpose)
ROBOTC PROGRAMMING
Wifi Startup function with description of activity for each defined and used function, included in header DIWIFI_connect_WEP
TEMPUS IV Project: 158644 -JPCR Development of Regional Interdisciplinary Mechatronic Studies DRIMS
ROBOTC PROGRAMMING
TEMPUS IV Project: 158644 -JPCR Development of Regional Interdisciplinary Mechatronic Studies DRIMS
ROBOTC PROGRAMMING
TEMPUS IV Project: 158644 -JPCR Development of Regional Interdisciplinary Mechatronic Studies DRIMS
ROBOTC PROGRAMMING
TEMPUS IV Project: 158644 -JPCR Development of Regional Interdisciplinary Mechatronic Studies DRIMS
ROBOTC PROGRAMMING
TEMPUS IV Project: 158644 -JPCR Development of Regional Interdisciplinary Mechatronic Studies DRIMS
ROBOTC PROGRAMMING
. config_wifi () DIWIFI-Connect_WEP.H
TEMPUS IV Project: 158644 -JPCR Development of Regional Interdisciplinary Mechatronic Studies DRIMS
ROBOTC PROGRAMMING
TEMPUS IV Project: 158644 -JPCR Development of Regional Interdisciplinary Mechatronic Studies DRIMS
ROBOTC PROGRAMMING
TEMPUS IV Project: 158644 -JPCR Development of Regional Interdisciplinary Mechatronic Studies DRIMS
ROBOTC PROGRAMMING
TEMPUS IV Project: 158644 -JPCR Development of Regional Interdisciplinary Mechatronic Studies DRIMS
ROBOTC PROGRAMMING
. Note that.. !
Code files (with a .c extension) are not the only files commonly seen in programs. The other type of file is called a header file, sometimes known as an include file. Header files almost always have a .h extension. The purpose of a header file is to hold declarations for other files to use.
TEMPUS IV Project: 158644 -JPCR Development of Regional Interdisciplinary Mechatronic Studies DRIMS
ROBOTC PROGRAMMING
replace the values of SSID and WPA_PSK (when use it for own purpose)
TEMPUS IV Project: 158644 -JPCR Development of Regional Interdisciplinary Mechatronic Studies DRIMS
ROBOTC PROGRAMMING
Wifi Startup function with description of activity for each defined and used function , included in header DIWIFI_connect_WP A
TEMPUS IV Project: 158644 -JPCR Development of Regional Interdisciplinary Mechatronic Studies DRIMS
ROBOTC PROGRAMMING
TEMPUS IV Project: 158644 -JPCR Development of Regional Interdisciplinary Mechatronic Studies DRIMS
ROBOTC PROGRAMMING
. scanBaudRate()- DIWIFI-Connect_WPA.H
TEMPUS IV Project: 158644 -JPCR Development of Regional Interdisciplinary Mechatronic Studies DRIMS
ROBOTC PROGRAMMING
TEMPUS IV Project: 158644 -JPCR Development of Regional Interdisciplinary Mechatronic Studies DRIMS
ROBOTC PROGRAMMING
. Software_flow_ctrl()- DIWIFI-Connect_WPA.H
TEMPUS IV Project: 158644 -JPCR Development of Regional Interdisciplinary Mechatronic Studies DRIMS
ROBOTC PROGRAMMING
TEMPUS IV Project: 158644 -JPCR Development of Regional Interdisciplinary Mechatronic Studies DRIMS
ROBOTC PROGRAMMING
TEMPUS IV Project: 158644 -JPCR Development of Regional Interdisciplinary Mechatronic Studies DRIMS
ROBOTC PROGRAMMING
Using Wifi Sensor you can send and receive data from a computer or other internet-enabled device. For example, you can send information or commands to a robot, or gather data from the robot. TCP connection: TCP is a two-way communication protocol that operates over the internet. The WIFI sensor can serve as both a server (handling multiple connections coming in) and a client (connecting to one server).
TEMPUS IV Project: 158644 -JPCR Development of Regional Interdisciplinary Mechatronic Studies DRIMS
ROBOTC PROGRAMMING
ROBOTC PROGRAMMING
. Note that.. ! Code files (with a .c extension) are not the only files commonly seen in programs. The other type of file is called a header file, sometimes known as an include file. Header files almost always have a .h extension. The purpose of a header file is to hold declarations for other files to us
TEMPUS IV Project: 158644 -JPCR Development of Regional Interdisciplinary Mechatronic Studies DRIMS
ROBOTC PROGRAMMING
TEMPUS IV Project: 158644 -JPCR Development of Regional Interdisciplinary Mechatronic Studies DRIMS
ROBOTC PROGRAMMING
TEMPUS IV Project: 158644 -JPCR Development of Regional Interdisciplinary Mechatronic Studies DRIMS
ROBOTC PROGRAMMING
TEMPUS IV Project: 158644 -JPCR Development of Regional Interdisciplinary Mechatronic Studies DRIMS
ROBOTC PROGRAMMING
TEMPUS IV Project: 158644 -JPCR Development of Regional Interdisciplinary Mechatronic Studies DRIMS
ROBOTC PROGRAMMING
Discusion, Questions ?
Comparison: WiFi Bluetooth ? Multy Robot communication ? Human- Robot communication web or mobile oriented ? Other sensors from Dexter Industry ?
TEMPUS IV Project: 158644 -JPCR Development of Regional Interdisciplinary Mechatronic Studies DRIMS
ROBOTC PROGRAMMING
References
www.dexterindustres.com http://iel.ucdavis.edu/projects/chmindstorms/ Lego Mindstorm, Help, http://www.robotc.net/teachingmindstorms http://www.cplusplus.com/doc/tutorial/functions/ http://www.tutorialspoint.com/cplusplus/cpp_functions.htm www.robotsquare.com
TEMPUS IV Project: 158644 -JPCR Development of Regional Interdisciplinary Mechatronic Studies DRIMS
ROBOTC PROGRAMMING