Wiki

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
resources:eval:user-guides:eval-adicup3029:reference_designs:demo_adxl362 [02 Feb 2018 15:43] – [Accelerometer Demo using Wi-Fi (with EVAL-ADXL362-ARDZ)] Mircea Caprioruresources:eval:user-guides:eval-adicup3029:reference_designs:demo_adxl362 [28 Feb 2018 17:43] – move obtaining source and added sw configurations under that Brandon Bushey
Line 22: Line 22:
     * PC or Laptop with a USB port     * PC or Laptop with a USB port
   * Software   * Software
-    * ADICUP3029_ADXL362 software+    * ADuCM3029_demo_adxl362 software
     * CrossCore Embedded Studio (2.6.0 or higher)     * CrossCore Embedded Studio (2.6.0 or higher)
     * ADuCM302x DFP (2.0.0 or higher)     * ADuCM302x DFP (2.0.0 or higher)
Line 35: Line 35:
    - Plug the **EVAL-ADXL362-ARDZ** shield in the **EVAL-ADICUP3029** base board. {{ :resources:eval:user-guides:eval-adicup3029:reference_designs:reference_design_adicup3029_esp8266_adxl362_hw_mod_combo.png?800 |}}    - Plug the **EVAL-ADXL362-ARDZ** shield in the **EVAL-ADICUP3029** base board. {{ :resources:eval:user-guides:eval-adicup3029:reference_designs:reference_design_adicup3029_esp8266_adxl362_hw_mod_combo.png?800 |}}
    - Plug the USB cable    - Plug the USB cable
 +
 +===== Obtaining the Source Code =====
 +
 +We recommend not opening the project directly, but rather import it into CrossCore Embedded Studios and make a local copy in your workspace. 
 +
 +The source code and include files of the **ADuCM3029_demo_esp8266** can be found here:
 +
 +<WRAP round 80% download>
 +
 +[[https://github.com/analogdevicesinc/EVAL-ADICUP3029/tree/master/projects/ADuCM3029_demo_esp8266| ADuCM3029_demo_esp8266 at Github]]
 +
 +</WRAP>
 +
 +<WRAP center round info 80%>
 +For more information on importing, debugging, or other tools related questions, please see the [[https://wiki.analog.com/resources/eval/user-guides/eval-adicup3029/tools/cces_user_guide |tools user guide.]] 
 +</WRAP>
 +
 +===== Configuring the Software =====
 +
 +  * ** Accelerometer scan interval** - how often to update sensor information. Set the // SCAN_SENSOR_TIME // parameter (//ADXL362.h//): 
 +
 +<code>
 +#define SCAN_SENSOR_TIME   500      // msecs
 +</code>
 +
 +  * ** Sensor activity and inactivity thresholds** - //ACT_VALUE// and //INACT_VALUE// paramaters used to determine at which acceleration values the sensor can react at sleep/wake-up commands (// ADXL362.h //):
 + 
 +<code>
 +#define ACT_VALUE          50      // msecs
 +#define INACT_VALUE        50      // msecs
 +</code>
 +
 +  * ** Sensor activity and inactivity time** - //ACT_TIMER// and //INACT_TIMER// paramaters used to determine sleep/wake-up intervals(// ADXL362.h //): 
 +
 +<code>
 +#define ACT_TIMER          100      // msecs
 +#define INACT_TIMER        10       // msecs
 +</code>
 +
 +  * **ESP8266.c/h** is the ESP8288 Library which uses AT commands and UART to communicate with the WiFi module. Here you should set your Wi-Fi connection and MQTT information: 
 +
 +<code>
 +#define SSID            "****" 
 +#define PASS         "****" 
 +#define MQTT_SERVER "****" 
 +</code>
  
 ===== Using an MQTT Broker ===== ===== Using an MQTT Broker =====
Line 85: Line 131:
   - The program will publish x, y, z data on the **//adxl//** topic. In order to view this information, we can use mosquitto_sub and subscribe to the **//adxl//** topic.   - The program will publish x, y, z data on the **//adxl//** topic. In order to view this information, we can use mosquitto_sub and subscribe to the **//adxl//** topic.
   - At each ADXL362 movement, an interrupt is triggered and as a result, the x, y, z information is published. In the console **//publishing sensor reading//** message is displayed, while in the mosquitto_sub cmd window you should see the values of x, y, z axis:  {{ :resources:eval:user-guides:eval-adicup3029:reference_designs:mosquitto_sub_adxl.png?nolink |}} {{ :resources:eval:user-guides:eval-adicup3029:reference_designs:console_publish_reading.png?nolink |}}   - At each ADXL362 movement, an interrupt is triggered and as a result, the x, y, z information is published. In the console **//publishing sensor reading//** message is displayed, while in the mosquitto_sub cmd window you should see the values of x, y, z axis:  {{ :resources:eval:user-guides:eval-adicup3029:reference_designs:mosquitto_sub_adxl.png?nolink |}} {{ :resources:eval:user-guides:eval-adicup3029:reference_designs:console_publish_reading.png?nolink |}}
- 
-===== Obtaining the Source Code ===== 
- 
-We recommend not opening the project directly, but rather import it into CrossCore Embedded Studios and make a local copy in your workspace.  
- 
-The source code and include files of the **AduCM3029_demo_esp8266** can be found here: 
- 
-<WRAP round 80% download> 
- 
-[[https://github.com/analogdevicesinc/EVAL-ADICUP3029/tree/master/projects/ADuCM3029_demo_esp8266| AduCM3029_demo_esp8266 at Github]] 
-  
-</WRAP> 
- 
  
 ===== How to use the Tools ===== ===== How to use the Tools =====
Line 118: Line 151:
   - **MQTT** folder contains the library which implements the MQTT protocol. We recommend to use it as is, without modifying anything.    - **MQTT** folder contains the library which implements the MQTT protocol. We recommend to use it as is, without modifying anything. 
   - **ADXL362.c/h** are the files for ADXL362 accelerometer control. Here you can modify:   - **ADXL362.c/h** are the files for ADXL362 accelerometer control. Here you can modify:
-            * ** Accelerometer scan interval** - how often to update sensor information. Set the // SCAN_SENSOR_TIME // parameter - **msec** (//ADXL362.h//): <code> #define SCAN_SENSOR_TIME   500 </code> +
-            * ** Sensor activity and inactivity thresholds** - //ACT_VALUE// and //INACT_VALUE// paramaters used to determine at which acceleration values the sensor can react at sleep/wake-up commands (// ADXL362.h //): <code> #define ACT_VALUE          50  +
- #define INACT_VALUE        50 </code> +
-            * ** Sensor activity and inactivity time** - //ACT_TIMER// and //INACT_TIMER// paramaters used to determine sleep/wake-up intervals(// ADXL362.h //): <code> #define ACT_TIMER          100 +
- #define INACT_TIMER        10 </code> +
-  - **ESP8266.c/h** is the ESP8288 Library which uses AT commands and UART to communicate with the WiFi module. Here you can and should modify:  +
-            * ** SSID, PASS and MQTT_SERVER** - replace with your specific data: <code> #define SSID           "****"  +
- #define PASS         "****"  +
- #define MQTT_SERVER "****" </code>+
  
 // End of Document// // End of Document//
resources/eval/user-guides/eval-adicup3029/reference_designs/demo_adxl362.txt · Last modified: 08 Mar 2021 07:21 by Zuedmar Arceo