2015-12-11 19:44:04 +02:00
|
|
|
find_package(Java REQUIRED)
|
|
|
|
include(UseJava)
|
|
|
|
|
|
|
|
macro(add_example example_name jar_name)
|
|
|
|
set(example_src "${example_name}.java")
|
2016-01-13 14:19:51 +02:00
|
|
|
set(example_jar "${CMAKE_CURRENT_BINARY_DIR}/../../src/${jar_name}/upm_${jar_name}.jar")
|
2015-12-11 19:44:04 +02:00
|
|
|
|
|
|
|
add_jar(${example_name} SOURCES ${example_src} INCLUDE_JARS ${example_jar})
|
2016-04-07 16:22:49 -07:00
|
|
|
add_dependencies(${example_name} javaupm_${jar_name})
|
2015-12-11 19:44:04 +02:00
|
|
|
endmacro()
|
|
|
|
|
2016-04-07 16:22:49 -07:00
|
|
|
macro(add_example_with_path example_name jar_path jar_name)
|
2015-12-11 19:44:04 +02:00
|
|
|
set(example_src "${example_name}.java")
|
2016-04-07 16:22:49 -07:00
|
|
|
set(example_jar "${CMAKE_CURRENT_BINARY_DIR}/../../src/${jar_path}/upm_${jar_name}.jar")
|
2015-12-11 19:44:04 +02:00
|
|
|
|
|
|
|
add_jar(${example_name} SOURCES ${example_src} INCLUDE_JARS ${example_jar})
|
2016-04-07 16:22:49 -07:00
|
|
|
add_dependencies(${example_name} javaupm_${jar_name})
|
2015-12-11 19:44:04 +02:00
|
|
|
endmacro()
|
|
|
|
|
|
|
|
add_example(A110X_intrSample a110x)
|
|
|
|
add_example(A110XSample a110x)
|
|
|
|
add_example(ADC121C021Sample adc121c021)
|
|
|
|
add_example(Adxl345Sample adxl345)
|
|
|
|
add_example(Apds9002 apds9002)
|
|
|
|
add_example(BISS0001Sample biss0001)
|
|
|
|
add_example(BMPX8XSample bmpx8x)
|
|
|
|
add_example(BuzzerSample buzzer)
|
|
|
|
add_example(CJQ4435Sample cjq4435)
|
|
|
|
add_example(DS1307Sample ds1307)
|
|
|
|
add_example(ENC03RSample enc03r)
|
|
|
|
add_example(ES08ASample servo)
|
2016-09-13 12:06:37 -07:00
|
|
|
add_example(ButtonSample button)
|
2016-09-13 17:29:02 -07:00
|
|
|
add_example(GroveButtonSample grove)
|
2016-09-13 12:06:37 -07:00
|
|
|
add_example(Button_intrSample button)
|
2016-09-13 17:29:02 -07:00
|
|
|
add_example(GroveButton_intrSample grove)
|
2016-09-12 14:37:53 -07:00
|
|
|
add_example(Collision collision)
|
2016-09-13 11:10:13 -07:00
|
|
|
add_example(EHRSample ehr)
|
2016-09-13 17:29:02 -07:00
|
|
|
add_example(GroveEHRSample groveehr)
|
2016-09-08 12:35:41 -07:00
|
|
|
add_example(Emg emg)
|
2016-09-13 17:29:02 -07:00
|
|
|
add_example(GroveEmg groveemg)
|
2016-09-08 13:55:23 -07:00
|
|
|
add_example(Gsr gsr)
|
2016-09-13 17:29:02 -07:00
|
|
|
add_example(GroveGsr grovegsr)
|
2016-09-12 16:16:30 -07:00
|
|
|
add_example(LEDSample led)
|
2016-09-10 13:29:34 -07:00
|
|
|
add_example(LightSample light)
|
2016-09-13 17:29:02 -07:00
|
|
|
add_example(GroveLightSample grove)
|
2015-12-11 19:44:04 +02:00
|
|
|
add_example(GroveLineFinderSample grovelinefinder)
|
2016-09-14 13:14:18 -07:00
|
|
|
add_example(LineFinderSample linefinder)
|
2016-09-13 17:29:02 -07:00
|
|
|
add_example(GroveLed_multiSample grove)
|
|
|
|
add_example(GroveLEDSample grove)
|
2015-12-11 19:44:04 +02:00
|
|
|
add_example(GroveMDSample grovemd)
|
2016-09-14 13:27:37 -07:00
|
|
|
add_example(MDSample md)
|
2016-09-12 15:25:45 -07:00
|
|
|
add_example(MoistureSample moisture)
|
2016-09-13 17:29:02 -07:00
|
|
|
add_example(GroveMoistureSample grovemoisture)
|
2015-12-11 19:44:04 +02:00
|
|
|
add_example(GroveMQ3 gas)
|
|
|
|
add_example(GroveMQ9 gas)
|
2016-09-07 10:18:06 -07:00
|
|
|
add_example(O2Example o2)
|
2016-09-13 17:29:02 -07:00
|
|
|
add_example(GroveO2Example groveo2)
|
2015-12-11 19:44:04 +02:00
|
|
|
add_example(GroveQTouch at42qt1070)
|
2016-09-12 12:48:37 -07:00
|
|
|
add_example(RelaySample relay)
|
2016-09-13 17:29:02 -07:00
|
|
|
add_example(GroveRelaySample grove)
|
2016-09-12 12:48:37 -07:00
|
|
|
add_example(RotarySample rotary)
|
2016-09-13 17:29:02 -07:00
|
|
|
add_example(GroveRotarySample grove)
|
2015-12-11 19:44:04 +02:00
|
|
|
add_example(GROVESCAMSample grovescam)
|
2016-09-13 17:22:17 -07:00
|
|
|
add_example(SCAMSample scam)
|
2016-09-10 13:29:34 -07:00
|
|
|
add_example(SlideSample slide)
|
2016-09-13 17:29:02 -07:00
|
|
|
add_example(GroveSlideSample grove)
|
2016-09-13 16:09:09 -07:00
|
|
|
add_example(SpeakerSample speaker)
|
2016-09-13 17:29:02 -07:00
|
|
|
add_example(GroveSpeakerSample grovespeaker)
|
2016-09-09 18:33:30 -07:00
|
|
|
add_example(TemperatureSample temperature)
|
2016-09-13 17:29:02 -07:00
|
|
|
add_example(GroveTempSample grove)
|
2016-09-01 16:32:49 -07:00
|
|
|
add_example(VDivSample vdiv)
|
2016-09-13 17:29:02 -07:00
|
|
|
add_example(GroveVDivSample grovevdiv)
|
2016-09-13 15:03:26 -07:00
|
|
|
add_example(WaterSample water)
|
2016-09-13 17:29:02 -07:00
|
|
|
add_example(GroveWaterSample grovewater)
|
2015-12-11 19:44:04 +02:00
|
|
|
add_example(GroveWFSSample grovewfs)
|
2016-09-14 11:37:08 -07:00
|
|
|
add_example(WFSSample wfs)
|
2015-12-11 19:44:04 +02:00
|
|
|
add_example(GUVAS12DSample guvas12d)
|
|
|
|
add_example(H3LIS331DLSample h3lis331dl)
|
|
|
|
add_example(HCSR04Sample hcsr04)
|
|
|
|
add_example(HM11Sample hm11)
|
|
|
|
add_example(Hmc5883lSample hmc5883l)
|
|
|
|
add_example(HMTRPSample hmtrp)
|
|
|
|
add_example(HP20xExample hp20x)
|
|
|
|
add_example(HTU21DSample htu21d)
|
|
|
|
add_example(Itg3200Sample itg3200)
|
2016-01-13 13:38:23 +02:00
|
|
|
add_example(Joystick12Sample joystick12)
|
2015-12-11 19:44:04 +02:00
|
|
|
add_example(LDT0028Sample ldt0028)
|
2016-01-13 13:38:23 +02:00
|
|
|
add_example(LoLSample lol)
|
2017-04-12 11:49:20 -06:00
|
|
|
add_example(LSM303DLHSample lsm303dlh)
|
2015-12-11 19:44:04 +02:00
|
|
|
add_example(M24LR64ESample m24lr64e)
|
|
|
|
add_example(MAX44000Sample max44000)
|
|
|
|
add_example(MHZ16Sample mhz16)
|
|
|
|
add_example(MicrophoneSample mic)
|
|
|
|
add_example(MMA7455Sample mma7455)
|
|
|
|
add_example(MMA7660Sample mma7660)
|
|
|
|
add_example(MPL3115A2Sample mpl3115a2)
|
|
|
|
add_example(MPR121Sample mpr121)
|
|
|
|
add_example(MPU9150Sample mpu9150)
|
|
|
|
add_example(MQ2Sample gas)
|
|
|
|
add_example(MQ303ASample mq303a)
|
|
|
|
add_example(MQ5Sample gas)
|
2016-01-29 18:54:13 -07:00
|
|
|
add_example(GroveLEDBar my9221)
|
2015-12-11 19:44:04 +02:00
|
|
|
add_example(NRF24L01_receiverSample nrf24l01)
|
|
|
|
add_example(NRF24L01_transmitterSample nrf24l01)
|
|
|
|
add_example(NUNCHUCKSample nunchuck)
|
|
|
|
add_example(OTP538USample otp538u)
|
|
|
|
add_example(PPD42NSSample ppd42ns)
|
|
|
|
add_example(PulsensorSample pulsensor)
|
|
|
|
add_example(RFR359FSample rfr359f)
|
|
|
|
add_example(RotaryEncoderSample rotaryencoder)
|
|
|
|
add_example(RPR220_intrSample rpr220)
|
|
|
|
add_example(RPR220Sample rpr220)
|
|
|
|
add_example(ST7735Sample st7735)
|
2017-02-07 17:00:29 -08:00
|
|
|
if (NOT ANDROID)
|
|
|
|
add_example(StepMotorSample stepmotor)
|
|
|
|
endif ()
|
2015-12-11 19:44:04 +02:00
|
|
|
add_example(TM1637Sample tm1637)
|
|
|
|
add_example(TP401Sample gas)
|
|
|
|
add_example(TSL2561Sample tsl2561)
|
|
|
|
add_example(TTP223Sample ttp223)
|
|
|
|
add_example(ULN200XASample uln200xa)
|
|
|
|
add_example(WaterLevelSensor waterlevel)
|
|
|
|
add_example(WT5001Sample wt5001)
|
|
|
|
add_example(YG1006Sample yg1006)
|
|
|
|
add_example(ZFM20Sample zfm20)
|
2016-03-10 15:55:10 -08:00
|
|
|
add_example(Ad8232Example ad8232)
|
|
|
|
add_example(Gp2y0aExample gp2y0a)
|
|
|
|
add_example(Th02Example th02)
|
|
|
|
add_example(FlexSensorExample flex)
|
2016-02-19 17:58:44 -07:00
|
|
|
add_example(CWLSXXA_Example cwlsxxa)
|
2016-02-26 17:08:26 -07:00
|
|
|
add_example(TEAMS_Example teams)
|
2016-03-01 20:10:17 +01:00
|
|
|
add_example(APA102Sample apa102)
|
2016-03-02 16:36:06 -07:00
|
|
|
add_example(TEX00_Example tex00)
|
2016-03-10 12:18:56 -07:00
|
|
|
add_example(BMI160_Example bmi160)
|
2016-03-30 10:23:18 -07:00
|
|
|
add_example(Tsl2561 tsl2561)
|
|
|
|
add_example(AM2315Example am2315)
|
2016-04-29 11:07:02 -07:00
|
|
|
add_example(MAX31855Example max31855)
|
|
|
|
add_example(MAX5487Example max5487)
|
|
|
|
add_example(MAXds3231mExample maxds3231m)
|
|
|
|
add_example(ECS1030Example ecs1030)
|
|
|
|
add_example(SM130Example sm130)
|
2016-03-11 16:36:18 -07:00
|
|
|
if (MODBUS_FOUND)
|
|
|
|
add_example(H803X_Example h803x)
|
|
|
|
endif()
|
2016-04-01 17:29:48 -06:00
|
|
|
if (BACNET_FOUND)
|
|
|
|
add_example(E50HX_Example e50hx)
|
2016-06-10 12:46:49 -06:00
|
|
|
add_example(T8100_Example t8100)
|
2016-06-10 13:05:46 -06:00
|
|
|
add_example(TB7300_Example tb7300)
|
2016-04-01 17:29:48 -06:00
|
|
|
endif()
|
2017-02-07 17:00:29 -08:00
|
|
|
if (JPEG_FOUND)
|
|
|
|
add_example(VCAP_Example vcap)
|
|
|
|
endif()
|
2016-05-04 12:47:39 -06:00
|
|
|
add_example(BMP280_Example bmp280)
|
2016-04-15 10:47:40 -06:00
|
|
|
add_example(BNO055_Example bno055)
|
bmx055, bmi055, bmc160, bma250e, bmg150, bmm150: Initial implementation
This module (bmx055) implements support for the following core Bosch
chipsets:
bma250e - accelerometer, 3 variants (chip id's 0x03, 0xf9, and 0xfa)
bmm150 - magnetometer
bmg160 - gyroscope
The other 3 devices are combinations of the above:
bmx055 - accel/gyro/mag
bmc160 - accel/mag
bmi055 - accel/gyro
...for 6 devices total.
For the combination devices, all of the sub-devices appear as
individual independent devices on the I2C/SPI bus.
The combination drivers provide basic configuration and data output.
For more detailed control as well as interrupt support, you should use
the core device drivers (accel/gyro/mag) directly.
These devices support both I2C and SPI communications. They must be
powered at 3.3vdc.
Signed-off-by: Jon Trulson <jtrulson@ics.com>
2016-05-06 17:56:51 -06:00
|
|
|
add_example(BMX055_Example bmx055)
|
2016-08-25 13:54:49 -06:00
|
|
|
add_example(NMEAGPS_Example nmea_gps)
|
2016-08-24 15:43:11 -06:00
|
|
|
add_example(MMA7361_Example mma7361)
|
2016-08-24 15:53:46 -06:00
|
|
|
add_example(BH1750_Example bh1750)
|
2016-08-29 17:42:54 -06:00
|
|
|
add_example(HKA5_Example hka5)
|
2016-08-31 18:22:24 -06:00
|
|
|
add_example(DFRORP_Example dfrorp)
|
2016-09-13 11:31:33 -06:00
|
|
|
add_example(DFREC_Example dfrec)
|
2016-09-16 16:50:09 -06:00
|
|
|
add_example(SHT1X_Example sht1x)
|
2016-11-11 17:41:28 -07:00
|
|
|
add_example(MS5803_Example ms5803)
|
2016-11-18 17:32:34 -07:00
|
|
|
add_example(ECEZO_Example ecezo)
|
2016-11-29 09:56:57 -08:00
|
|
|
add_example(IMS_Example ims)
|
2016-12-02 16:42:33 -07:00
|
|
|
add_example(MB704X_Example mb704x)
|
2016-11-10 11:55:48 -07:00
|
|
|
add_example(MCP2515_Example mcp2515)
|
2017-01-05 17:06:45 -08:00
|
|
|
add_example(Ads1015Sample ads1x15)
|
2016-12-08 15:24:36 -08:00
|
|
|
add_example(MAX30100_Example max30100)
|
2017-02-07 16:20:13 -08:00
|
|
|
add_example(Ads1115Sample ads1x15)
|
2017-02-21 13:54:21 -08:00
|
|
|
add_example(SensorTemplateSample sensortemplate)
|
2017-03-08 09:40:56 -08:00
|
|
|
add_example(P9813Sample p9813)
|
2017-03-21 17:01:14 -06:00
|
|
|
add_example(BMG160_Example bmg160)
|
2017-03-24 17:04:48 -06:00
|
|
|
add_example(BMA250E_Example bma250e)
|
2017-03-29 13:15:45 -06:00
|
|
|
add_example(BMM150_Example bmm150)
|
2017-04-14 16:24:57 -06:00
|
|
|
add_example(LSM303AGR_Example lsm303agr)
|
2017-04-19 16:02:11 -06:00
|
|
|
add_example(LSM303D_Example lsm303d)
|
2015-12-11 19:44:04 +02:00
|
|
|
|
lcd/lcm1602/jhd1313m1: remove lcm1602 and jhd1313m1 from lcd library
The lcm1602 and jhd1313m1 drivers had been rewritten in C with a C++
wrapper some time ago, however the original lcm and jhd drivers were
still present in the lcd library. In addition, to avoid header file
conflicts, the new, separated lcm and jhd header files were renamed
with a .hxx prefix.
This patch:
- renames the new lcm1602/ and jhd1313m1/ header files to have the
usual .hpp prefix.
- removes the lcm1602, jhd1313m1, and sainsmartks drivers from the
lcd/ (i2clcd) library.
- fixes the examples to use the "new" libraries (lcm1602 and
jhd1313m1)
- changes the argument type for the createChar() (C++) to use a byte
vector (std::vector<uint8_t>) rather than a typedef'd char array.
The lcm1602_create_char() function (C) uses a standard char *. The
use of std::vector is well supported by SWIG.
- SWIG interface files changed to use upm_vectortypes.i, and removes
the carrays helpers, which should no longer be needed for these
drivers.
- removes the inclusion of the driver C .h header files into the SWIG
interface files - this should not be needed for these drivers.
- the sainsmartks driver will be placed into it's own new lcdks (LCD
Keypad Shield) library. This library should support the
SainsmartKS, DFRobot LCD Keypad Shield, and similar products from
other manufacturers in a future commit.
Signed-off-by: Jon Trulson <jtrulson@ics.com>
2017-03-15 11:43:50 -06:00
|
|
|
add_example_with_path(Jhd1313m1_lcdSample jhd1313m1 jhd1313m1)
|
|
|
|
add_example_with_path(Jhd1313m1Sample jhd1313m1 jhd1313m1)
|
|
|
|
add_example_with_path(Lcm1602_i2cSample lcm1602 lcm1602)
|
|
|
|
add_example_with_path(Lcm1602_parallelSample lcm1602 lcm1602)
|
2016-04-07 16:22:49 -07:00
|
|
|
add_example_with_path(SSD1308_oledSample lcd i2clcd)
|
|
|
|
add_example_with_path(SSD1327_oledSample lcd i2clcd)
|
2016-05-04 12:47:39 -06:00
|
|
|
add_example_with_path(BME280_Example bmp280 bmp280)
|
2017-02-06 14:59:00 -08:00
|
|
|
|
|
|
|
if(SWIG_VERSION VERSION_GREATER 3.0.8)
|
|
|
|
add_example_with_path(BME280_InterfaceExample bmp280 bmp280)
|
|
|
|
endif()
|
|
|
|
|
bmx055, bmi055, bmc160, bma250e, bmg150, bmm150: Initial implementation
This module (bmx055) implements support for the following core Bosch
chipsets:
bma250e - accelerometer, 3 variants (chip id's 0x03, 0xf9, and 0xfa)
bmm150 - magnetometer
bmg160 - gyroscope
The other 3 devices are combinations of the above:
bmx055 - accel/gyro/mag
bmc160 - accel/mag
bmi055 - accel/gyro
...for 6 devices total.
For the combination devices, all of the sub-devices appear as
individual independent devices on the I2C/SPI bus.
The combination drivers provide basic configuration and data output.
For more detailed control as well as interrupt support, you should use
the core device drivers (accel/gyro/mag) directly.
These devices support both I2C and SPI communications. They must be
powered at 3.3vdc.
Signed-off-by: Jon Trulson <jtrulson@ics.com>
2016-05-06 17:56:51 -06:00
|
|
|
add_example_with_path(BMC150_Example bmx055 bmx055)
|
|
|
|
add_example_with_path(BMI055_Example bmx055 bmx055)
|
ozw: Rework and add some device specific drivers and examples.
This commit reworks ozw somewhat and adds some device specific drivers
with examples. All of these drivers are kept in the UPM ozw library.
The OZW class has been reworked to make it a proper singleton, since
the OpenZWave::Manager() it depends on is already a singleton. This
avoids issues such as opening and initializing OpenZWave multiple
times.
A new, relatively thin base class, ozwInterface is also now present.
This class wraps some basic functionality, and handles initialization
of the OZW base class. It is intended to be inherited by device
driver classes. It operates on a node id for a device. Each OZW
device is referenced by a node id, which does not change unless the
device is removed (and possibly re-added) to a Z-Wave network.
Finally, a series of device specific drivers have been implemented.
These provide basic functionality to monitor and in some cases control
the operation of a Z-Wave device. They are the following:
ozwdump - This is a fake 'device' driver that initializes an OZW
network and dumps information on all of the nodes (devices) present.
Along with each node, available information on each valueid associated
with that node is also printed. This fake device and it's examples
replace the original ozw example.
aeotecss6 - Aeotec Smart Switch 6. This device allows control of the
switch, as well as reporting of information the switch makes
available, such as current consumption, volts, watts, and accumulated
energy use (kWh).
aeotecsdg2 - Aeotec Smart Dimmer Gen 2. This device is similar to the
Smart Switch 6, but also provides dimming functionality. It also
provides information on energy use.
aeotecdw2e - Aeotec Door/Window Sensor 2nd Edition. This device is a
magnetic switch with an embedded tamper switch used to detect the
opening/closing of windows and doors. This is a battery powered
device.
aeotecdsb09104 - Aeotec Home Energy Monitor. This device is intended
to be installed at the MAINS or Breaker box. It reports current and
cumulative energy consumption.
tzemt400 - Trane TZEMT400 Thermostat. This device is a thermostat
with Z-Wave functionality. The variant tested was the
TZEMT400BB32MAA. The driver reports various information on the status
of the thermostat, as well as the current measured temperature.
Signed-off-by: Jon Trulson <jtrulson@ics.com>
2016-07-06 13:25:39 -06:00
|
|
|
if (OPENZWAVE_FOUND)
|
|
|
|
add_example_with_path(AeotecSS6_Example ozw ozw)
|
|
|
|
add_example_with_path(AeotecSDG2_Example ozw ozw)
|
|
|
|
add_example_with_path(AeotecDW2E_Example ozw ozw)
|
|
|
|
add_example_with_path(AeotecDSB09104_Example ozw ozw)
|
|
|
|
add_example_with_path(TZEMT400_Example ozw ozw)
|
|
|
|
endif()
|
2016-08-26 16:34:13 -06:00
|
|
|
add_example_with_path(NMEAGPS_I2C_Example nmea_gps nmea_gps)
|
2016-11-10 11:55:48 -07:00
|
|
|
add_example_with_path(MCP2515_TXRX_Example mcp2515 mcp2515)
|
2017-01-17 11:37:14 -07:00
|
|
|
add_example_with_path(LE910_Example uartat uartat)
|
2017-02-01 17:03:10 -07:00
|
|
|
add_example_with_path(SpeakerPWMSample speaker speaker)
|