tinkerforge 2.1.22 → 2.1.23
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/tinkerforge/brick_dc.rb +3 -3
- data/lib/tinkerforge/brick_hat.rb +11 -7
- data/lib/tinkerforge/brick_hat_zero.rb +2 -2
- data/lib/tinkerforge/brick_imu.rb +3 -3
- data/lib/tinkerforge/brick_imu_v2.rb +3 -3
- data/lib/tinkerforge/brick_master.rb +5 -5
- data/lib/tinkerforge/brick_red.rb +2 -2
- data/lib/tinkerforge/brick_servo.rb +3 -3
- data/lib/tinkerforge/brick_silent_stepper.rb +3 -3
- data/lib/tinkerforge/brick_stepper.rb +4 -4
- data/lib/tinkerforge/bricklet_accelerometer.rb +2 -2
- data/lib/tinkerforge/bricklet_accelerometer_v2.rb +81 -6
- data/lib/tinkerforge/bricklet_air_quality.rb +2 -2
- data/lib/tinkerforge/bricklet_ambient_light.rb +2 -2
- data/lib/tinkerforge/bricklet_ambient_light_v2.rb +2 -2
- data/lib/tinkerforge/bricklet_ambient_light_v3.rb +2 -2
- data/lib/tinkerforge/bricklet_analog_in.rb +2 -2
- data/lib/tinkerforge/bricklet_analog_in_v2.rb +2 -2
- data/lib/tinkerforge/bricklet_analog_in_v3.rb +2 -2
- data/lib/tinkerforge/bricklet_analog_out.rb +2 -2
- data/lib/tinkerforge/bricklet_analog_out_v2.rb +2 -2
- data/lib/tinkerforge/bricklet_analog_out_v3.rb +2 -2
- data/lib/tinkerforge/bricklet_barometer.rb +2 -2
- data/lib/tinkerforge/bricklet_barometer_v2.rb +2 -2
- data/lib/tinkerforge/bricklet_can.rb +2 -2
- data/lib/tinkerforge/bricklet_can_v2.rb +2 -2
- data/lib/tinkerforge/bricklet_co2.rb +2 -2
- data/lib/tinkerforge/bricklet_co2_v2.rb +2 -2
- data/lib/tinkerforge/bricklet_color.rb +4 -4
- data/lib/tinkerforge/bricklet_color_v2.rb +449 -0
- data/lib/tinkerforge/bricklet_compass.rb +356 -0
- data/lib/tinkerforge/bricklet_current12.rb +2 -2
- data/lib/tinkerforge/bricklet_current25.rb +2 -2
- data/lib/tinkerforge/bricklet_distance_ir.rb +2 -2
- data/lib/tinkerforge/bricklet_distance_ir_v2.rb +2 -2
- data/lib/tinkerforge/bricklet_distance_us.rb +2 -2
- data/lib/tinkerforge/bricklet_distance_us_v2.rb +300 -0
- data/lib/tinkerforge/bricklet_dmx.rb +2 -2
- data/lib/tinkerforge/bricklet_dual_button.rb +2 -2
- data/lib/tinkerforge/bricklet_dual_button_v2.rb +2 -2
- data/lib/tinkerforge/bricklet_dual_relay.rb +2 -2
- data/lib/tinkerforge/bricklet_dust_detector.rb +2 -2
- data/lib/tinkerforge/bricklet_e_paper_296x128.rb +2 -2
- data/lib/tinkerforge/bricklet_energy_monitor.rb +375 -0
- data/lib/tinkerforge/bricklet_gps.rb +2 -2
- data/lib/tinkerforge/bricklet_gps_v2.rb +2 -2
- data/lib/tinkerforge/bricklet_hall_effect.rb +2 -2
- data/lib/tinkerforge/bricklet_hall_effect_v2.rb +2 -2
- data/lib/tinkerforge/bricklet_humidity.rb +2 -2
- data/lib/tinkerforge/bricklet_humidity_v2.rb +2 -2
- data/lib/tinkerforge/bricklet_industrial_analog_out.rb +2 -2
- data/lib/tinkerforge/bricklet_industrial_analog_out_v2.rb +2 -2
- data/lib/tinkerforge/bricklet_industrial_counter.rb +2 -2
- data/lib/tinkerforge/bricklet_industrial_digital_in_4.rb +2 -2
- data/lib/tinkerforge/bricklet_industrial_digital_in_4_v2.rb +2 -2
- data/lib/tinkerforge/bricklet_industrial_digital_out_4.rb +2 -2
- data/lib/tinkerforge/bricklet_industrial_digital_out_4_v2.rb +2 -2
- data/lib/tinkerforge/bricklet_industrial_dual_0_20ma.rb +2 -2
- data/lib/tinkerforge/bricklet_industrial_dual_0_20ma_v2.rb +2 -2
- data/lib/tinkerforge/bricklet_industrial_dual_analog_in.rb +2 -2
- data/lib/tinkerforge/bricklet_industrial_dual_analog_in_v2.rb +2 -2
- data/lib/tinkerforge/bricklet_industrial_dual_relay.rb +2 -2
- data/lib/tinkerforge/bricklet_industrial_quad_relay.rb +2 -2
- data/lib/tinkerforge/bricklet_industrial_quad_relay_v2.rb +2 -2
- data/lib/tinkerforge/bricklet_io16.rb +2 -2
- data/lib/tinkerforge/bricklet_io16_v2.rb +2 -2
- data/lib/tinkerforge/bricklet_io4.rb +2 -2
- data/lib/tinkerforge/bricklet_io4_v2.rb +2 -2
- data/lib/tinkerforge/bricklet_isolator.rb +2 -2
- data/lib/tinkerforge/bricklet_joystick.rb +2 -2
- data/lib/tinkerforge/bricklet_joystick_v2.rb +2 -2
- data/lib/tinkerforge/bricklet_laser_range_finder.rb +2 -2
- data/lib/tinkerforge/bricklet_laser_range_finder_v2.rb +5 -5
- data/lib/tinkerforge/bricklet_lcd_128x64.rb +24 -2
- data/lib/tinkerforge/bricklet_lcd_16x2.rb +2 -2
- data/lib/tinkerforge/bricklet_lcd_20x4.rb +2 -2
- data/lib/tinkerforge/bricklet_led_strip.rb +2 -2
- data/lib/tinkerforge/bricklet_led_strip_v2.rb +2 -2
- data/lib/tinkerforge/bricklet_line.rb +2 -2
- data/lib/tinkerforge/bricklet_linear_poti.rb +2 -2
- data/lib/tinkerforge/bricklet_linear_poti_v2.rb +2 -2
- data/lib/tinkerforge/bricklet_load_cell.rb +2 -2
- data/lib/tinkerforge/bricklet_load_cell_v2.rb +2 -2
- data/lib/tinkerforge/bricklet_moisture.rb +2 -2
- data/lib/tinkerforge/bricklet_motion_detector.rb +2 -2
- data/lib/tinkerforge/bricklet_motion_detector_v2.rb +2 -2
- data/lib/tinkerforge/bricklet_motorized_linear_poti.rb +2 -2
- data/lib/tinkerforge/bricklet_multi_touch.rb +2 -2
- data/lib/tinkerforge/bricklet_multi_touch_v2.rb +334 -0
- data/lib/tinkerforge/bricklet_nfc.rb +2 -2
- data/lib/tinkerforge/bricklet_nfc_rfid.rb +2 -2
- data/lib/tinkerforge/bricklet_oled_128x64.rb +2 -2
- data/lib/tinkerforge/bricklet_oled_128x64_v2.rb +24 -2
- data/lib/tinkerforge/bricklet_oled_64x48.rb +2 -2
- data/lib/tinkerforge/bricklet_one_wire.rb +2 -2
- data/lib/tinkerforge/bricklet_outdoor_weather.rb +2 -2
- data/lib/tinkerforge/bricklet_particulate_matter.rb +2 -2
- data/lib/tinkerforge/bricklet_piezo_buzzer.rb +2 -2
- data/lib/tinkerforge/bricklet_piezo_speaker.rb +2 -2
- data/lib/tinkerforge/bricklet_piezo_speaker_v2.rb +2 -2
- data/lib/tinkerforge/bricklet_ptc.rb +2 -2
- data/lib/tinkerforge/bricklet_ptc_v2.rb +2 -2
- data/lib/tinkerforge/bricklet_real_time_clock.rb +2 -2
- data/lib/tinkerforge/bricklet_real_time_clock_v2.rb +2 -2
- data/lib/tinkerforge/bricklet_remote_switch.rb +2 -2
- data/lib/tinkerforge/bricklet_remote_switch_v2.rb +2 -2
- data/lib/tinkerforge/bricklet_rgb_led.rb +2 -2
- data/lib/tinkerforge/bricklet_rgb_led_button.rb +2 -2
- data/lib/tinkerforge/bricklet_rgb_led_matrix.rb +2 -2
- data/lib/tinkerforge/bricklet_rgb_led_v2.rb +2 -2
- data/lib/tinkerforge/bricklet_rotary_encoder.rb +2 -2
- data/lib/tinkerforge/bricklet_rotary_encoder_v2.rb +2 -2
- data/lib/tinkerforge/bricklet_rotary_poti.rb +2 -2
- data/lib/tinkerforge/bricklet_rotary_poti_v2.rb +259 -0
- data/lib/tinkerforge/bricklet_rs232.rb +2 -2
- data/lib/tinkerforge/bricklet_rs232_v2.rb +2 -2
- data/lib/tinkerforge/bricklet_rs485.rb +70 -60
- data/lib/tinkerforge/bricklet_segment_display_4x7.rb +2 -2
- data/lib/tinkerforge/bricklet_segment_display_4x7_v2.rb +2 -2
- data/lib/tinkerforge/bricklet_solid_state_relay.rb +2 -2
- data/lib/tinkerforge/bricklet_solid_state_relay_v2.rb +2 -2
- data/lib/tinkerforge/bricklet_sound_intensity.rb +2 -2
- data/lib/tinkerforge/bricklet_sound_pressure_level.rb +2 -2
- data/lib/tinkerforge/bricklet_temperature.rb +2 -2
- data/lib/tinkerforge/bricklet_temperature_ir.rb +5 -3
- data/lib/tinkerforge/bricklet_temperature_ir_v2.rb +3 -11
- data/lib/tinkerforge/bricklet_temperature_v2.rb +2 -2
- data/lib/tinkerforge/bricklet_thermal_imaging.rb +2 -2
- data/lib/tinkerforge/bricklet_thermocouple.rb +2 -2
- data/lib/tinkerforge/bricklet_thermocouple_v2.rb +2 -2
- data/lib/tinkerforge/bricklet_tilt.rb +2 -2
- data/lib/tinkerforge/bricklet_uv_light.rb +2 -2
- data/lib/tinkerforge/bricklet_uv_light_v2.rb +2 -2
- data/lib/tinkerforge/bricklet_voltage.rb +2 -2
- data/lib/tinkerforge/bricklet_voltage_current.rb +2 -2
- data/lib/tinkerforge/bricklet_voltage_current_v2.rb +13 -2
- data/lib/tinkerforge/bricklet_xmc1400_breakout.rb +365 -0
- data/lib/tinkerforge/ip_connection.rb +1 -1
- data/lib/tinkerforge/version.rb +1 -1
- metadata +10 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dd64988900a2ab596ea927820dc04695bc91f1b194cbf6cb35e85ec89014f26c
|
4
|
+
data.tar.gz: 658c988980986bed5dad437fd81d2ad7c39b109cbdc0bdb946b3706d4baf18e3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8a5c039bbbecf10223b7e7c47beae80a3123cf0297a2e4c74066ed45495bcebb6d04e468bcbafe50dcc4be43e23b38fcd94dbabb1adad8e5b6f7b06c6c387a79
|
7
|
+
data.tar.gz: 31d3663aea0a113e769a4bfd49383e7c638944f424ee3a729ebec9aecdac9db3912a1d7d387770d4db9224d8b0c6fe0fa9566592866a5004585368867507df9b
|
data/lib/tinkerforge/brick_dc.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
# -*- ruby encoding: utf-8 -*-
|
2
2
|
#############################################################
|
3
|
-
# This file was automatically generated on 2019-
|
3
|
+
# This file was automatically generated on 2019-08-23. #
|
4
4
|
# #
|
5
|
-
# Ruby Bindings Version 2.1.
|
5
|
+
# Ruby Bindings Version 2.1.23 #
|
6
6
|
# #
|
7
7
|
# If you have a bugfix for this file and want to commit it, #
|
8
8
|
# please fix the bug in the generator. You can find a link #
|
@@ -465,7 +465,7 @@ module Tinkerforge
|
|
465
465
|
# value returned is not the ambient temperature!
|
466
466
|
#
|
467
467
|
# The temperature is only proportional to the real temperature and it has an
|
468
|
-
# accuracy of
|
468
|
+
# accuracy of ±15%. Practically it is only useful as an indicator for
|
469
469
|
# temperature changes.
|
470
470
|
def get_chip_temperature
|
471
471
|
send_request FUNCTION_GET_CHIP_TEMPERATURE, [], '', 2, 's'
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# -*- ruby encoding: utf-8 -*-
|
2
2
|
#############################################################
|
3
|
-
# This file was automatically generated on 2019-
|
3
|
+
# This file was automatically generated on 2019-08-23. #
|
4
4
|
# #
|
5
|
-
# Ruby Bindings Version 2.1.
|
5
|
+
# Ruby Bindings Version 2.1.23 #
|
6
6
|
# #
|
7
7
|
# If you have a bugfix for this file and want to commit it, #
|
8
8
|
# please fix the bug in the generator. You can find a link #
|
@@ -79,17 +79,21 @@ module Tinkerforge
|
|
79
79
|
|
80
80
|
# Sets the sleep mode.
|
81
81
|
#
|
82
|
+
# .. note::
|
83
|
+
# Calling this function will cut the Raspberry Pi's power after Power Off Delay seconds.
|
84
|
+
# You have to shut down the Operating System yourself, e.g. by calling 'sudo shutdown -h now'.
|
85
|
+
#
|
82
86
|
# Parameters:
|
83
87
|
#
|
84
|
-
# * Power Off Delay: Time before the RPi/Bricklets are powered off
|
85
|
-
# * Power Off Duration: Duration that the RPi/Bricklets stay powered off
|
86
|
-
# * Raspberry Pi Off: RPi
|
88
|
+
# * Power Off Delay: Time in seconds before the RPi/Bricklets are powered off.
|
89
|
+
# * Power Off Duration: Duration in seconds that the RPi/Bricklets stay powered off.
|
90
|
+
# * Raspberry Pi Off: RPi is powered off if set to true.
|
87
91
|
# * Bricklets Off: Bricklets are powered off if set to true.
|
88
92
|
# * Enable Sleep Indicator: If set to true, the status LED will blink in a 1s interval
|
89
|
-
# during the whole power off duration. This will draw
|
93
|
+
# during the whole power off duration. This will draw additional 0.3mA.
|
90
94
|
#
|
91
95
|
# Example: To turn RPi and Bricklets off in 5 seconds for 10 minutes with sleep
|
92
|
-
# indicator enabled call (5, 60*10, true, true, true).
|
96
|
+
# indicator enabled, call (5, 60*10, true, true, true).
|
93
97
|
#
|
94
98
|
# This function can also be used to implement a watchdog. To do this you can
|
95
99
|
# write a program that calls this function once per second in a loop with
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# -*- ruby encoding: utf-8 -*-
|
2
2
|
#############################################################
|
3
|
-
# This file was automatically generated on 2019-
|
3
|
+
# This file was automatically generated on 2019-08-23. #
|
4
4
|
# #
|
5
|
-
# Ruby Bindings Version 2.1.
|
5
|
+
# Ruby Bindings Version 2.1.23 #
|
6
6
|
# #
|
7
7
|
# If you have a bugfix for this file and want to commit it, #
|
8
8
|
# please fix the bug in the generator. You can find a link #
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# -*- ruby encoding: utf-8 -*-
|
2
2
|
#############################################################
|
3
|
-
# This file was automatically generated on 2019-
|
3
|
+
# This file was automatically generated on 2019-08-23. #
|
4
4
|
# #
|
5
|
-
# Ruby Bindings Version 2.1.
|
5
|
+
# Ruby Bindings Version 2.1.23 #
|
6
6
|
# #
|
7
7
|
# If you have a bugfix for this file and want to commit it, #
|
8
8
|
# please fix the bug in the generator. You can find a link #
|
@@ -625,7 +625,7 @@ module Tinkerforge
|
|
625
625
|
# value returned is not the ambient temperature!
|
626
626
|
#
|
627
627
|
# The temperature is only proportional to the real temperature and it has an
|
628
|
-
# accuracy of
|
628
|
+
# accuracy of ±15%. Practically it is only useful as an indicator for
|
629
629
|
# temperature changes.
|
630
630
|
def get_chip_temperature
|
631
631
|
send_request FUNCTION_GET_CHIP_TEMPERATURE, [], '', 2, 's'
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# -*- ruby encoding: utf-8 -*-
|
2
2
|
#############################################################
|
3
|
-
# This file was automatically generated on 2019-
|
3
|
+
# This file was automatically generated on 2019-08-23. #
|
4
4
|
# #
|
5
|
-
# Ruby Bindings Version 2.1.
|
5
|
+
# Ruby Bindings Version 2.1.23 #
|
6
6
|
# #
|
7
7
|
# If you have a bugfix for this file and want to commit it, #
|
8
8
|
# please fix the bug in the generator. You can find a link #
|
@@ -674,7 +674,7 @@ module Tinkerforge
|
|
674
674
|
# value returned is not the ambient temperature!
|
675
675
|
#
|
676
676
|
# The temperature is only proportional to the real temperature and it has an
|
677
|
-
# accuracy of
|
677
|
+
# accuracy of ±15%. Practically it is only useful as an indicator for
|
678
678
|
# temperature changes.
|
679
679
|
def get_chip_temperature
|
680
680
|
send_request FUNCTION_GET_CHIP_TEMPERATURE, [], '', 2, 's'
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# -*- ruby encoding: utf-8 -*-
|
2
2
|
#############################################################
|
3
|
-
# This file was automatically generated on 2019-
|
3
|
+
# This file was automatically generated on 2019-08-23. #
|
4
4
|
# #
|
5
|
-
# Ruby Bindings Version 2.1.
|
5
|
+
# Ruby Bindings Version 2.1.23 #
|
6
6
|
# #
|
7
7
|
# If you have a bugfix for this file and want to commit it, #
|
8
8
|
# please fix the bug in the generator. You can find a link #
|
@@ -554,7 +554,7 @@ module Tinkerforge
|
|
554
554
|
# Sets the channel used by the Chibi Extension. Possible channels are
|
555
555
|
# different for different frequencies:
|
556
556
|
#
|
557
|
-
# "Frequency",
|
557
|
+
# "Frequency", "Possible Channels"
|
558
558
|
#
|
559
559
|
# "OQPSK 868MHz (Europe)", "0"
|
560
560
|
# "OQPSK 915MHz (US)", "1, 2, 3, 4, 5, 6, 7, 8, 9, 10"
|
@@ -1487,7 +1487,7 @@ module Tinkerforge
|
|
1487
1487
|
send_request FUNCTION_GET_WIFI2_AP_CONFIGURATION, [], '', 54, '? Z32 C4 C4 C4 C ? C C6'
|
1488
1488
|
end
|
1489
1489
|
|
1490
|
-
# Sets the access point password (up to 63 chars) for the configured encryption
|
1490
|
+
# Sets the access point password (at least 8 and up to 63 chars) for the configured encryption
|
1491
1491
|
# mode, see BrickMaster#set_wifi2_ap_configuration.
|
1492
1492
|
#
|
1493
1493
|
# To apply configuration changes to the WIFI Extension 2.0 the
|
@@ -1816,7 +1816,7 @@ module Tinkerforge
|
|
1816
1816
|
# value returned is not the ambient temperature!
|
1817
1817
|
#
|
1818
1818
|
# The temperature is only proportional to the real temperature and it has an
|
1819
|
-
# accuracy of
|
1819
|
+
# accuracy of ±15%. Practically it is only useful as an indicator for
|
1820
1820
|
# temperature changes.
|
1821
1821
|
def get_chip_temperature
|
1822
1822
|
send_request FUNCTION_GET_CHIP_TEMPERATURE, [], '', 2, 's'
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# -*- ruby encoding: utf-8 -*-
|
2
2
|
#############################################################
|
3
|
-
# This file was automatically generated on 2019-
|
3
|
+
# This file was automatically generated on 2019-08-23. #
|
4
4
|
# #
|
5
|
-
# Ruby Bindings Version 2.1.
|
5
|
+
# Ruby Bindings Version 2.1.23 #
|
6
6
|
# #
|
7
7
|
# If you have a bugfix for this file and want to commit it, #
|
8
8
|
# please fix the bug in the generator. You can find a link #
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# -*- ruby encoding: utf-8 -*-
|
2
2
|
#############################################################
|
3
|
-
# This file was automatically generated on 2019-
|
3
|
+
# This file was automatically generated on 2019-08-23. #
|
4
4
|
# #
|
5
|
-
# Ruby Bindings Version 2.1.
|
5
|
+
# Ruby Bindings Version 2.1.23 #
|
6
6
|
# #
|
7
7
|
# If you have a bugfix for this file and want to commit it, #
|
8
8
|
# please fix the bug in the generator. You can find a link #
|
@@ -584,7 +584,7 @@ module Tinkerforge
|
|
584
584
|
# value returned is not the ambient temperature!
|
585
585
|
#
|
586
586
|
# The temperature is only proportional to the real temperature and it has an
|
587
|
-
# accuracy of
|
587
|
+
# accuracy of ±15%. Practically it is only useful as an indicator for
|
588
588
|
# temperature changes.
|
589
589
|
def get_chip_temperature
|
590
590
|
send_request FUNCTION_GET_CHIP_TEMPERATURE, [], '', 2, 's'
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# -*- ruby encoding: utf-8 -*-
|
2
2
|
#############################################################
|
3
|
-
# This file was automatically generated on 2019-
|
3
|
+
# This file was automatically generated on 2019-08-23. #
|
4
4
|
# #
|
5
|
-
# Ruby Bindings Version 2.1.
|
5
|
+
# Ruby Bindings Version 2.1.23 #
|
6
6
|
# #
|
7
7
|
# If you have a bugfix for this file and want to commit it, #
|
8
8
|
# please fix the bug in the generator. You can find a link #
|
@@ -878,7 +878,7 @@ module Tinkerforge
|
|
878
878
|
# value returned is not the ambient temperature!
|
879
879
|
#
|
880
880
|
# The temperature is only proportional to the real temperature and it has an
|
881
|
-
# accuracy of
|
881
|
+
# accuracy of ±15%. Practically it is only useful as an indicator for
|
882
882
|
# temperature changes.
|
883
883
|
def get_chip_temperature
|
884
884
|
send_request FUNCTION_GET_CHIP_TEMPERATURE, [], '', 2, 's'
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# -*- ruby encoding: utf-8 -*-
|
2
2
|
#############################################################
|
3
|
-
# This file was automatically generated on 2019-
|
3
|
+
# This file was automatically generated on 2019-08-23. #
|
4
4
|
# #
|
5
|
-
# Ruby Bindings Version 2.1.
|
5
|
+
# Ruby Bindings Version 2.1.23 #
|
6
6
|
# #
|
7
7
|
# If you have a bugfix for this file and want to commit it, #
|
8
8
|
# please fix the bug in the generator. You can find a link #
|
@@ -393,7 +393,7 @@ module Tinkerforge
|
|
393
393
|
# is enabled (see BrickStepper#set_sync_rect).
|
394
394
|
#
|
395
395
|
# For a good explanation of the different decay modes see
|
396
|
-
# `this <
|
396
|
+
# `this <https://ebldc.com/?p=86/>`__ blog post by Avayan.
|
397
397
|
#
|
398
398
|
# A good decay mode is unfortunately different for every motor. The best
|
399
399
|
# way to work out a good decay mode for your stepper motor, if you can't
|
@@ -635,7 +635,7 @@ module Tinkerforge
|
|
635
635
|
# value returned is not the ambient temperature!
|
636
636
|
#
|
637
637
|
# The temperature is only proportional to the real temperature and it has an
|
638
|
-
# accuracy of
|
638
|
+
# accuracy of ±15%. Practically it is only useful as an indicator for
|
639
639
|
# temperature changes.
|
640
640
|
def get_chip_temperature
|
641
641
|
send_request FUNCTION_GET_CHIP_TEMPERATURE, [], '', 2, 's'
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# -*- ruby encoding: utf-8 -*-
|
2
2
|
#############################################################
|
3
|
-
# This file was automatically generated on 2019-
|
3
|
+
# This file was automatically generated on 2019-08-23. #
|
4
4
|
# #
|
5
|
-
# Ruby Bindings Version 2.1.
|
5
|
+
# Ruby Bindings Version 2.1.23 #
|
6
6
|
# #
|
7
7
|
# If you have a bugfix for this file and want to commit it, #
|
8
8
|
# please fix the bug in the generator. You can find a link #
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# -*- ruby encoding: utf-8 -*-
|
2
2
|
#############################################################
|
3
|
-
# This file was automatically generated on 2019-
|
3
|
+
# This file was automatically generated on 2019-08-23. #
|
4
4
|
# #
|
5
|
-
# Ruby Bindings Version 2.1.
|
5
|
+
# Ruby Bindings Version 2.1.23 #
|
6
6
|
# #
|
7
7
|
# If you have a bugfix for this file and want to commit it, #
|
8
8
|
# please fix the bug in the generator. You can find a link #
|
@@ -25,7 +25,19 @@ module Tinkerforge
|
|
25
25
|
# be configured with BrickletAccelerometerV2#set_configuration and this callback can be
|
26
26
|
# enabled with BrickletAccelerometerV2#set_continuous_acceleration_configuration.
|
27
27
|
#
|
28
|
-
# The
|
28
|
+
# The returned values are raw ADC data. If you want to put this data into
|
29
|
+
# a FFT to determine the occurrences of specific frequencies we recommend
|
30
|
+
# that you use the data as is. It has all of the ADC noise in it. This noise
|
31
|
+
# looks like pure noise at first glance, but it might still have some frequnecy
|
32
|
+
# information in it that can be utilized by the FFT.
|
33
|
+
#
|
34
|
+
# Otherwise you have to use the following formulas that depend on the
|
35
|
+
# full scale range (see BrickletAccelerometerV2#set_configuration) to calculate
|
36
|
+
# the data in g/10000 (same unit that is returned by BrickletAccelerometerV2#get_acceleration):
|
37
|
+
#
|
38
|
+
# * Full scale 2G: acceleration = value*625/1024
|
39
|
+
# * Full scale 4G: acceleration = value*1250/1024
|
40
|
+
# * Full scale 8G: acceleration = value*2500/1024
|
29
41
|
#
|
30
42
|
# The data is formated in the sequence "x, y, z, x, y, z, ..." depending on
|
31
43
|
# the enabled axis. Examples:
|
@@ -39,7 +51,19 @@ module Tinkerforge
|
|
39
51
|
# be configured with BrickletAccelerometerV2#set_configuration and this callback can be
|
40
52
|
# enabled with BrickletAccelerometerV2#set_continuous_acceleration_configuration.
|
41
53
|
#
|
42
|
-
# The
|
54
|
+
# The returned values are raw ADC data. If you want to put this data into
|
55
|
+
# a FFT to determine the occurrences of specific frequencies we recommend
|
56
|
+
# that you use the data as is. It has all of the ADC noise in it. This noise
|
57
|
+
# looks like pure noise at first glance, but it might still have some frequnecy
|
58
|
+
# information in it that can be utilized by the FFT.
|
59
|
+
#
|
60
|
+
# Otherwise you have to use the following formulas that depend on the
|
61
|
+
# full scale range (see BrickletAccelerometerV2#set_configuration) to calculate
|
62
|
+
# the data in g/10000 (same unit that is returned by BrickletAccelerometerV2#get_acceleration):
|
63
|
+
#
|
64
|
+
# * Full scale 2G: acceleration = value*256*625/1024
|
65
|
+
# * Full scale 4G: acceleration = value*256*1250/1024
|
66
|
+
# * Full scale 8G: acceleration = value*256*2500/1024
|
43
67
|
#
|
44
68
|
# The data is formated in the sequence "x, y, z, x, y, z, ..." depending on
|
45
69
|
# the enabled axis. Examples:
|
@@ -58,6 +82,8 @@ module Tinkerforge
|
|
58
82
|
FUNCTION_GET_INFO_LED_CONFIG = 7 # :nodoc:
|
59
83
|
FUNCTION_SET_CONTINUOUS_ACCELERATION_CONFIGURATION = 9 # :nodoc:
|
60
84
|
FUNCTION_GET_CONTINUOUS_ACCELERATION_CONFIGURATION = 10 # :nodoc:
|
85
|
+
FUNCTION_SET_FILTER_CONFIGURATION = 13 # :nodoc:
|
86
|
+
FUNCTION_GET_FILTER_CONFIGURATION = 14 # :nodoc:
|
61
87
|
FUNCTION_GET_SPITFP_ERROR_COUNT = 234 # :nodoc:
|
62
88
|
FUNCTION_SET_BOOTLOADER_MODE = 235 # :nodoc:
|
63
89
|
FUNCTION_GET_BOOTLOADER_MODE = 236 # :nodoc:
|
@@ -95,6 +121,10 @@ module Tinkerforge
|
|
95
121
|
INFO_LED_CONFIG_SHOW_HEARTBEAT = 2 # :nodoc:
|
96
122
|
RESOLUTION_8BIT = 0 # :nodoc:
|
97
123
|
RESOLUTION_16BIT = 1 # :nodoc:
|
124
|
+
IIR_BYPASS_APPLIED = 0 # :nodoc:
|
125
|
+
IIR_BYPASS_BYPASSED = 1 # :nodoc:
|
126
|
+
LOW_PASS_FILTER_NINTH = 0 # :nodoc:
|
127
|
+
LOW_PASS_FILTER_HALF = 1 # :nodoc:
|
98
128
|
BOOTLOADER_MODE_BOOTLOADER = 0 # :nodoc:
|
99
129
|
BOOTLOADER_MODE_FIRMWARE = 1 # :nodoc:
|
100
130
|
BOOTLOADER_MODE_BOOTLOADER_WAIT_FOR_REBOOT = 2 # :nodoc:
|
@@ -116,7 +146,7 @@ module Tinkerforge
|
|
116
146
|
def initialize(uid, ipcon)
|
117
147
|
super uid, ipcon
|
118
148
|
|
119
|
-
@api_version = [2, 0,
|
149
|
+
@api_version = [2, 0, 1]
|
120
150
|
|
121
151
|
@response_expected[FUNCTION_GET_ACCELERATION] = RESPONSE_EXPECTED_ALWAYS_TRUE
|
122
152
|
@response_expected[FUNCTION_SET_CONFIGURATION] = RESPONSE_EXPECTED_FALSE
|
@@ -127,6 +157,8 @@ module Tinkerforge
|
|
127
157
|
@response_expected[FUNCTION_GET_INFO_LED_CONFIG] = RESPONSE_EXPECTED_ALWAYS_TRUE
|
128
158
|
@response_expected[FUNCTION_SET_CONTINUOUS_ACCELERATION_CONFIGURATION] = RESPONSE_EXPECTED_FALSE
|
129
159
|
@response_expected[FUNCTION_GET_CONTINUOUS_ACCELERATION_CONFIGURATION] = RESPONSE_EXPECTED_ALWAYS_TRUE
|
160
|
+
@response_expected[FUNCTION_SET_FILTER_CONFIGURATION] = RESPONSE_EXPECTED_FALSE
|
161
|
+
@response_expected[FUNCTION_GET_FILTER_CONFIGURATION] = RESPONSE_EXPECTED_ALWAYS_TRUE
|
130
162
|
@response_expected[FUNCTION_GET_SPITFP_ERROR_COUNT] = RESPONSE_EXPECTED_ALWAYS_TRUE
|
131
163
|
@response_expected[FUNCTION_SET_BOOTLOADER_MODE] = RESPONSE_EXPECTED_ALWAYS_TRUE
|
132
164
|
@response_expected[FUNCTION_GET_BOOTLOADER_MODE] = RESPONSE_EXPECTED_ALWAYS_TRUE
|
@@ -222,8 +254,26 @@ module Tinkerforge
|
|
222
254
|
# one of the axis is enabled and the resolution is set to 16 bit,
|
223
255
|
# the CALLBACK_CONTINUOUS_ACCELERATION_16_BIT callback is activated.
|
224
256
|
#
|
257
|
+
# The returned values are raw ADC data. If you want to put this data into
|
258
|
+
# a FFT to determine the occurrences of specific frequencies we recommend
|
259
|
+
# that you use the data as is. It has all of the ADC noise in it. This noise
|
260
|
+
# looks like pure noise at first glance, but it might still have some frequnecy
|
261
|
+
# information in it that can be utilized by the FFT.
|
262
|
+
#
|
263
|
+
# Otherwise you have to use the following formulas that depend on the configured
|
264
|
+
# resolution (8/16 bit) and the full scale range (see BrickletAccelerometerV2#set_configuration) to calculate
|
265
|
+
# the data in g/10000 (same unit that is returned by BrickletAccelerometerV2#get_acceleration):
|
266
|
+
#
|
267
|
+
# * 16 bit, full scale 2G: acceleration = value*625/1024
|
268
|
+
# * 16 bit, full scale 4G: acceleration = value*1250/1024
|
269
|
+
# * 16 bit, full scale 8G: acceleration = value*2500/1024
|
270
|
+
#
|
225
271
|
# If a resolution of 8 bit is used, only the 8 most significant bits will be
|
226
|
-
# transferred
|
272
|
+
# transferred, so you can use the following formulas:
|
273
|
+
#
|
274
|
+
# * 8 bit, full scale 2G: acceleration = value*256*625/1024
|
275
|
+
# * 8 bit, full scale 4G: acceleration = value*256*1250/1024
|
276
|
+
# * 8 bit, full scale 8G: acceleration = value*256*2500/1024
|
227
277
|
#
|
228
278
|
# If no axis is enabled, both callbacks are disabled. If one of the continuous
|
229
279
|
# callbacks is enabled, the CALLBACK_ACCELERATION callback is disabled.
|
@@ -245,6 +295,31 @@ module Tinkerforge
|
|
245
295
|
send_request FUNCTION_GET_CONTINUOUS_ACCELERATION_CONFIGURATION, [], '', 4, '? ? ? C'
|
246
296
|
end
|
247
297
|
|
298
|
+
# Configures IIR Bypass filter mode and low pass filter roll off corner frequency.
|
299
|
+
#
|
300
|
+
# The filter can be applied or bypassed and the corner frequency can be
|
301
|
+
# half or a ninth of the output data rate.
|
302
|
+
#
|
303
|
+
# .. image:: /Images/Bricklets/bricklet_accelerometer_v2_filter.png
|
304
|
+
# :scale: 100 %
|
305
|
+
# :alt: Accelerometer filter
|
306
|
+
# :align: center
|
307
|
+
# :target: ../../_images/Bricklets/bricklet_accelerometer_v2_filter.png
|
308
|
+
#
|
309
|
+
# By default filtering is applied and the filter corner frequency is a ninth of the output data rate.
|
310
|
+
#
|
311
|
+
# .. versionadded:: 2.0.2$nbsp;(Plugin)
|
312
|
+
def set_filter_configuration(iir_bypass, low_pass_filter)
|
313
|
+
send_request FUNCTION_SET_FILTER_CONFIGURATION, [iir_bypass, low_pass_filter], 'C C', 0, ''
|
314
|
+
end
|
315
|
+
|
316
|
+
# Returns the configuration as set by BrickletAccelerometerV2#set_filter_configuration.
|
317
|
+
#
|
318
|
+
# .. versionadded:: 2.0.2$nbsp;(Plugin)
|
319
|
+
def get_filter_configuration
|
320
|
+
send_request FUNCTION_GET_FILTER_CONFIGURATION, [], '', 2, 'C C'
|
321
|
+
end
|
322
|
+
|
248
323
|
# Returns the error count for the communication between Brick and Bricklet.
|
249
324
|
#
|
250
325
|
# The errors are divided into
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# -*- ruby encoding: utf-8 -*-
|
2
2
|
#############################################################
|
3
|
-
# This file was automatically generated on 2019-
|
3
|
+
# This file was automatically generated on 2019-08-23. #
|
4
4
|
# #
|
5
|
-
# Ruby Bindings Version 2.1.
|
5
|
+
# Ruby Bindings Version 2.1.23 #
|
6
6
|
# #
|
7
7
|
# If you have a bugfix for this file and want to commit it, #
|
8
8
|
# please fix the bug in the generator. You can find a link #
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# -*- ruby encoding: utf-8 -*-
|
2
2
|
#############################################################
|
3
|
-
# This file was automatically generated on 2019-
|
3
|
+
# This file was automatically generated on 2019-08-23. #
|
4
4
|
# #
|
5
|
-
# Ruby Bindings Version 2.1.
|
5
|
+
# Ruby Bindings Version 2.1.23 #
|
6
6
|
# #
|
7
7
|
# If you have a bugfix for this file and want to commit it, #
|
8
8
|
# please fix the bug in the generator. You can find a link #
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# -*- ruby encoding: utf-8 -*-
|
2
2
|
#############################################################
|
3
|
-
# This file was automatically generated on 2019-
|
3
|
+
# This file was automatically generated on 2019-08-23. #
|
4
4
|
# #
|
5
|
-
# Ruby Bindings Version 2.1.
|
5
|
+
# Ruby Bindings Version 2.1.23 #
|
6
6
|
# #
|
7
7
|
# If you have a bugfix for this file and want to commit it, #
|
8
8
|
# please fix the bug in the generator. You can find a link #
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# -*- ruby encoding: utf-8 -*-
|
2
2
|
#############################################################
|
3
|
-
# This file was automatically generated on 2019-
|
3
|
+
# This file was automatically generated on 2019-08-23. #
|
4
4
|
# #
|
5
|
-
# Ruby Bindings Version 2.1.
|
5
|
+
# Ruby Bindings Version 2.1.23 #
|
6
6
|
# #
|
7
7
|
# If you have a bugfix for this file and want to commit it, #
|
8
8
|
# please fix the bug in the generator. You can find a link #
|