mirror of
				https://github.com/eclipse/upm.git
				synced 2025-10-31 15:15:07 +03:00 
			
		
		
		
	Added iGyroscope interface
Signed-off-by: Serban Waltter <serban.waltter@rinftech.com>
This commit is contained in:
		| @@ -23,6 +23,7 @@ | ||||
|  */ | ||||
|  | ||||
| import upm_bmg160.BMG160; | ||||
| import upm_interfaces.*; | ||||
| import java.util.AbstractList; | ||||
| import java.lang.Float; | ||||
|  | ||||
|   | ||||
| @@ -22,6 +22,9 @@ | ||||
|  * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||||
|  */ | ||||
|  | ||||
| import java.util.AbstractList; | ||||
| import upm_interfaces.*; | ||||
|  | ||||
| import upm_bmi160.BMI160; | ||||
|  | ||||
| public class BMI160_Example | ||||
| @@ -39,25 +42,25 @@ public class BMI160_Example | ||||
|                 // update our values from the sensor | ||||
|                 sensor.update(); | ||||
|  | ||||
|                 float dataA[] = sensor.getAccelerometer(); | ||||
|                 AbstractList<Float> dataA = sensor.getAcceleration(); | ||||
|  | ||||
|                 System.out.println("Accelerometer: " | ||||
|                                    + "AX: " | ||||
|                                    + dataA[0] | ||||
|                                    + dataA.get(0) | ||||
|                                    + " AY: " | ||||
|                                    + dataA[1] | ||||
|                                    + dataA.get(1) | ||||
|                                    + " AZ: " | ||||
|                                    + dataA[2]); | ||||
|                                    + dataA.get(2)); | ||||
|  | ||||
|                 float dataG[] = sensor.getGyroscope(); | ||||
|                 AbstractList<Float> dataG = sensor.getGyroscope(); | ||||
|  | ||||
|                 System.out.println("Gryoscope:     " | ||||
|                                    + "GX: " | ||||
|                                    + dataG[0] | ||||
|                                    + dataG.get(0) | ||||
|                                    + " GY: " | ||||
|                                    + dataG[1] | ||||
|                                    + dataG.get(1) | ||||
|                                    + " GZ: " | ||||
|                                    + dataG[2]); | ||||
|                                    + dataG.get(2)); | ||||
|  | ||||
|                 float dataM[] = sensor.getMagnetometer(); | ||||
|  | ||||
|   | ||||
| @@ -79,7 +79,7 @@ add_example(BISS0001_Example "biss0001;interfaces") | ||||
| add_example(BMA250E_Example "bma250e;interfaces") | ||||
| add_example(BMC150_Example "bmx055;interfaces") | ||||
| add_example(BME280_Example "bmp280;interfaces") | ||||
| add_example(BMG160_Example bmg160) | ||||
| add_example(BMG160_Example "bmg160;interfaces") | ||||
| add_example(BMI055_Example "bmx055;interfaces") | ||||
| add_example(BMI160_Example "bmi160;interfaces") | ||||
| add_example(BMM150_Example bmm150) | ||||
| @@ -139,7 +139,7 @@ add_example(Hmc5883l_Example hmc5883l) | ||||
| add_example(HMTRP_Example hmtrp) | ||||
| add_example(HP20x_Example "hp20x;interfaces") | ||||
| add_example(HTU21D_Example "htu21d;interfaces") | ||||
| add_example(Itg3200_Example itg3200) | ||||
| add_example(Itg3200_Example "itg3200;interfaces") | ||||
| add_example(Jhd1313m1_Example jhd1313m1) | ||||
| add_example(Jhd1313m1_lcd_Example jhd1313m1) | ||||
| add_example(Joystick12_Example joystick12) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Serban Waltter
					Serban Waltter