The Microchip Wi-Fi Client Module Development Kit is a demo board designed to connect to cloud based servers. It features a Microchip PIC32 and the Microchip WiFi Module MRF24WG0MA microcontroller. After doing this tutorial you’ll be able to read the potentiometer and the buttons on the WCM board, sending their values to Ubidots, as well as reading variables from Ubidots to control the board’s LEDs from the cloud.
1.- Download the MPLABX IDE from Microchip’s website.
3.- Check that you have installed all the tools. Your installation folder should look something like this:
4.- Download the sample project for networking and unzip the file in a desired project directory (this code has been modified to transmit to Ubidots).
5.- Start “MPLABX” and go to “File”–>“Open Project” and look for this file inside the folder you just downloaded:
- V00.40.05_WCM_Dev_Kit_1_Beta4V6/ 00.40.05_WCM_Dev_Kit_1_Beta4V6/tcpip/ tcpip_wifi_wcm_dev_app/tcpip_pic32_mrf24wg_wcm_dev_app.X
Send values and get values from Ubidots
- Back to the MPLAB IDE, look for a file named “main_demo.h”. You should change the value of idvarled1, idvarled2, idvarled3, idvarled4, idpot, token, idvarbtn1, idvarbtn2, idvarbtn3, idvarbtn4 with your own token and respectives IDs.
- Now we’re ready to burn the code. Connect the PICKit 3 to the WCM board (turned ON) and the other end to the PC. Then click on “Run”—>“Run project”. If everything is OK then the D5 LED should start blinking blue.
- After being programmed, the board will create a Wi-Fi network called “WCM_Soft_AP_2ed1”, connect to this network. Then open a new tab from your web browser and type the following IP “192.168.1.25”.
- Click on configure Network and then on the “Other Network…”“ button. Check Adhoc or Infrastructure depending on your network type, then enter your network’s SSID and finally choose its security type: WEP or WPA/WPA2 passphrase.
- Click on "Join” and type your Wi-Fi password. After some blinking party, the LEDs D5 and D6 should be blinking blue, that means you are connected to Ubidots.
- That’s all!