Hi all,
I have created a project (Open C-project Wizard -> Name Project -> Finish) to implement the 'Enable all sensors in one' code which can be found here:
https://developer.bosch.com/web/xdk/enable-all-sensors-in-one
I copied the full code example into the '.c' file of my project in XDK Workbench. I then proceeded to clean the project, build the project and flash it to the XDK. Despite doing this, I am not receiveing any of the sensor measurements in my concole. I am guessing it may have something to do with the 72 warnings which are generated when building the project; particularly the onces which say the sensor statuses are depreceated. I have attached a zip file showing all the warnings and the console output. Other possibly relevant information:
- The XDK remains connected to the com port before and after flashing (it is disconnected for the brief time when booting the application, as with every other program).
- I have tried compiling the XDKApplicationTemplate and also a HelloWorldExample on the XDK, both of which work.
- When flashing to the device, LED 2 flashes orange, and LED 4 remains red. After connection has been established, all LEDs turn off.
Thankyou in advance for helping.
Hello Stallion
I have created a new XDK C project by Selecting File->New->Project option.
New Project window opens. Under XDK, Selected C project and Clicked Next.
New XDK C project window opens, I have given project name as "Sensor_Test" and Clicked Finish.
"Sensor_Test" was created in Project Explorer.
I have copied full source code from the https://developer.bosch.com/web/xdk/enable-all-sensors-in-one link. Removed the exisiting code from "AppController.c" file and pasted the copied code in "AppController.c" file of "Sensor_Test" project.
Compiled the Project and Flashed the binary into XDK device.
I am able to get sensor data.
I have attached test results below for reference,
INFO | Try to flash application 'Sensor_Test.bin' on device 'XDK Device 1'
INFO | Port 'COM12' has been disconnected
INFO | Flashing application 'Sensor_Test.bin' successfully executed
INFO | Booting application...
INFO | Connecting to XDK device 'XDK Device 1' in port 'COM12'...
INFO | Connection to port 'COM12' established
INFO | Booting application...
INFO | XDK DEVICE 1: b
INFO | XDK DEVICE 1: Performing application CRC validation (this will take a couple of seconds)
INFO | XDK DEVICE 1: Jumping to application
INFO | Port 'COM12' has been disconnected
INFO | Connecting to XDK device 'XDK Device 1' in port 'COM12'...
INFO | Connection to port 'COM12' established
INFO | XDK DEVICE 1: Accelerometer Converted data :
INFO | XDK DEVICE 1: x =20 mg
INFO | XDK DEVICE 1: y =11 mg
INFO | XDK DEVICE 1: z =1044 mg
INFO | XDK DEVICE 1: Accelerometer Raw data :
INFO | XDK DEVICE 1: x =20
INFO | XDK DEVICE 1: y =11
INFO | XDK DEVICE 1: z =1044
INFO | XDK DEVICE 1: BME280 Environmental Conversion Data for Humidity:
INFO | XDK DEVICE 1: h =78 %rh
INFO | XDK DEVICE 1: BME280 Environmental Conversion Data for Pressure :
INFO | XDK DEVICE 1: p =96165 Pa
INFO | XDK DEVICE 1: BME280 Environmental Conversion Data for temperature :
INFO | XDK DEVICE 1: t =26731 mDeg
INFO | XDK DEVICE 1: Magnetometer Converted data :
INFO | XDK DEVICE 1: x =4 microTesla
INFO | XDK DEVICE 1: y =-34 microTesla
INFO | XDK DEVICE 1: z =11 microTesla
INFO | XDK DEVICE 1: r =6515
INFO | XDK DEVICE 1: Magnetometer Raw data :
INFO | XDK DEVICE 1: x =4
INFO | XDK DEVICE 1: y =-34
INFO | XDK DEVICE 1: z =11
INFO | XDK DEVICE 1: r =6515
INFO | XDK DEVICE 1: Gyro Converted Data :
INFO | XDK DEVICE 1: x =0 mDeg
INFO | XDK DEVICE 1: y =-610 mDeg
INFO | XDK DEVICE 1: z =61 mDeg
INFO | XDK DEVICE 1: Gyro Raw Data :
INFO | XDK DEVICE 1: x =0
INFO | XDK DEVICE 1: y =-610
INFO | XDK DEVICE 1: z =61
INFO | XDK DEVICE 1: Light sensor data obtained in millilux :74880
INFO | XDK DEVICE 1: Noise Sensor RMS Voltage :
INFO | XDK DEVICE 1: Vrms = 0.000000