Home
- Yoctopuce
Contents
1. Returns the unique hardware identifier of the analog input in the form SERIAL FUNCTIONID anbutton get_isPressed Returns true if the input considered as binary is active closed contact and false otherwise anbutton get_lastTimePressed Returns the number of elapsed milliseconds between the module power on and the last time the input button was pressed the input contact transitioned from open to closed anbutton get_lastTimeReleased Returns the number of elapsed milliseconds between the module power on and the last time the input button was released the input contact transitioned from closed to open anbutton get_logicalName Returns the logical name of the analog input anbutton get_module Gets the YModule object for the device on which the function is located anbutton get_module_async callback context Gets the YModule object for the device on which the function is located asynchronous version anbutton get_pulseCounter Returns the pulse counter value anbutton get_pulseTimer Returns the timer of the pulses counter ms anbutton get_rawValue Returns the current measured input value as is between 0 and 4095 included anbutton get_sensitivity Returns the sensibility for the input between 1 and 1000 for triggering user callbacks anbutton get_userData Returns the value of the userData attribute as previously stored using method set_userData
2. include yocto_servo h import yocto_servo h uses yocto_servo yocto_servo vb yocto_servo cs import com yoctopuce YoctoAPI YServo from yocto_servo import Global functions yFindServo func Retrieves a servo for a given identifier yFirstServo Starts the enumeration of servos currently accessible YServo methods servo describe Returns a short text that describes unambiguously the instance of the servo in the form TYPE NAME SERIAL FUNCTIONID servo get_advertisedValue Returns the current value of the servo no more than 6 characters servo get_enabled Returns the state of the servos servo get_enabledAtPowerOn Returns the servo signal generator state at power up servo get_errorMessage Returns the error message of the latest error with the servo servo get_errorType Returns the numerical error code of the latest error with the servo servo get_friendlyName Returns a global identifier of the servo in the format MODULE_NAME FUNCT ION_NAME servo get_functionDescriptor Returns a unique identifier of type YF UN_DESCR corresponding to the function servo get_functionld Returns the hardware identifier of the servo without reference to the module servo get_hardwareld Returns the unique hardware identifier of the servo in the form SERIAL FUNCTIONID servo get_logicalName Returns the logical name of the servo 3 Reference s
3. include yocto_wireless h import yocto_wireless h uses yocto_wireless yocto_wireless vb yocto_wireless cs import com yoctopuce YoctoAPI YWireless from yocto_wireless import Global functions yFindWireless func Retrieves a wireless lan interface for a given identifier yFirstWireless Starts the enumeration of wireless lan interfaces currently accessible YWireless methods wireless adhocNetwork ssid securityKey Changes the configuration of the wireless lan interface to create an ad hoc wireless network without using an access point wireless describe Returns a short text that describes unambiguously the instance of the wireless lan interface in the form TYPE NAME SERIAL FUNCTIONID wireless get_advertisedValue Returns the current value of the wireless lan interface no more than 6 characters wireless get_channel Returns the 802 11 channel currently used or 0 when the selected network has not been found wireless get_detectedWlans Returns a list of YWlanRecord objects that describe detected Wireless networks wireless get_errorMessage Returns the error message of the latest error with the wireless lan interface wireless get_errorType Returns the numerical error code of the latest error with the wireless lan interface wireless get_friendlyName Returns a global identifier of the wireless lan interface in the format MODULE_NAME FUNCTION_NAME
4. network get_adminPassword Returns a hash string if a password has been set for user admin or an empty string otherwise network get_advertisedValue Returns the current value of the network interface no more than 6 characters network get_callbackCredentials Returns a hashed version of the notification callback credentials if set or an empty string otherwise network get_callbackEncoding Returns the encoding standard to use for representing notification values network get_callbackMaxDelay Returns the maximum waiting time between two callback notifications in seconds network get_callbackMethod Returns the HTTP method used to notify callbacks for significant state changes network get_callbackMinDelay Returns the minimum waiting time between two callback notifications in seconds network get_callbackUrl Returns the callback URL to notify of significant state changes network get_discoverable Returns the activation state of the multicast announce protocols to allow easy discovery of the module in the network neighborhood uPnP Bonjour protocol 3 Reference network get_errorMessage Returns the error message of the latest error with the network interface network get_errorType Returns the numerical error code of the latest error with the network interface network get_friendlyName Returns a global identifier of the network interface in the format MODULE_NAME FUNCT ION_
5. In order to use the functions described here you should include lt script type text javascript src yocto_api js gt lt script gt var yoctolib require yoctolib var YAPI yoctolib YAPI var YModule yoctolib YModule require_once yocto_api php include yocto_api h import yocto_api h uses yocto_api yocto_api vb yocto_api cs import com yoctopuce YoctoAPI YModule from yocto_api import Global functions yFindModule func Allows you to find a module from its serial number or from its logical name yFirstModule Starts the enumeration of modules currently accessible YModule methods module checkFirmware path onlynew Test if the byn file is valid for this module module gt describe Returns a descriptive text that identifies the module module download pathname Downloads the specified built in file and returns a binary buffer with its content module gt functionCount Returns the number of functions beside the module interface available on the module module functionld functionIndex Retrieves the hardware identifier of the nth function on the module module functionName functionIndex Retrieves the logical name of the nth function on the module module functionValue functionIndex Retrieves the advertised value of the nth function on the module module get_allSettings Returns all the setting of the module module get_beacon Returns the state of the local
6. compass get_module Gets the YModule object for the device on which the function is located compass get_module_async callback context Gets the YModule object for the device on which the function is located asynchronous version compass get_recordedData startTime endTime Retrieves a DataSet object holding historical data for this sensor for a specified time interval compass get_reportFrequency Returns the timed value notification frequency or OFF if timed value notifications are disabled for this function compass get_resolution Returns the resolution of the measured values compass gt get_unit Returns the measuring unit for the relative bearing compass get_userData Returns the value of the userData attribute as previously stored using method set_userData compass isOnline Checks if the compass is currently reachable without raising any error compass isOnline_async callback context Checks if the compass is currently reachable without raising any error asynchronous version compass load msvValidity Preloads the compass cache with a specified validity duration compass loadCalibrationPoints rawValues refValues Retrieves error correction data points previously entered using the method calibrateFromPoints compass load_async msValidity callback context Preloads the compass cache with a specified validity duration asynchronous version compass
7. lightsensor get_module Gets the YModule object for the device on which the function is located lightsensor get_module_async callback context Gets the YModule object for the device on which the function is located asynchronous version lightsensor get_recordedData startTime endTime Retrieves a DataSet object holding historical data for this sensor for a specified time interval lightsensor get_reportFrequency Returns the timed value notification frequency or OFF if timed value notifications are disabled for this function lightsensor get_resolution Returns the resolution of the measured values lightsensor get_unit Returns the measuring unit for the ambient light lightsensor get_userData Returns the value of the userData attribute as previously stored using method set_userData lightsensor isOnline Checks if the light sensor is currently reachable without raising any error lightsensor isOnline_async callback context Checks if the light sensor is currently reachable without raising any error asynchronous version lightsensor load msValidity Preloads the light sensor cache with a specified validity duration lightsensor loadCalibrationPoints rawValues refValues Retrieves error correction data points previously entered using the method calibrateFromPoints lightsensor load_async msValidity callback context Preloads the light sensor cache with a specified validi
8. sensor get_functionDescriptor Returns a unique identifier of type YF UN_DESCR corresponding to the function sensor get_functionld Returns the hardware identifier of the sensor without reference to the module sensor get_hardwareld 3 Reference Returns the unique hardware identifier of the sensor in the form SERIAL FUNCTIONID sensor get_highestValue Returns the maximal value observed for the measure since the device was started sensor get_logFrequency Returns the datalogger recording frequency for this function or OFF when measures are not stored in the data logger flash memory sensor get_logicalName Returns the logical name of the sensor sensor get_lowestValue Returns the minimal value observed for the measure since the device was started sensor get_module Gets the YModule object for the device on which the function is located sensor get_module_async callback context Gets the YModule object for the device on which the function is located asynchronous version sensor get_recordedData startTime endTime Retrieves a DataSet object holding historical data for this sensor for a specified time interval sensor get_reportFrequency Returns the timed value notification frequency or OFF if timed value notifications are disabled for this function sensor get_resolution Returns the resolution of the measured values sensor
9. Performs a smooth transition in the HSL color space between the current color and a target color colorled isOnline Checks if the RGB led is currently reachable without raising any error colorled isOnline_async callback context Checks if the RGB led is currently reachable without raising any error asynchronous version colorled load msValidity Preloads the RGB led cache with a specified validity duration colorled load_async msValidity callback context Preloads the RGB led cache with a specified validity duration asynchronous version colorled nextColorLed Continues the enumeration of RGB leds started using yFirstColorLed colorled registerValueCallback callback Registers the callback function that is invoked on every change of advertised value colorled rgbMove rgb_target ms_duration Performs a smooth transition in the RGB color space between the current color and a target color colorled set_hsIColor newval Changes the current color of the led using a color HSL colorled set_logicalName newval Changes the logical name of the RGB led colorled set_rgbColor newval Changes the current color of the led using a RGB color colorled set_rgbColorAtPowerOn newval Changes the color that the led will display by default when the module is turned on colorled set_userData data Stores a user context provided as argument in the userData attribute of the function colorled wait_async callback co
10. anbutton isOnline Checks if the analog input is currently reachable without raising any error anbutton isOnline_async callback context Checks if the analog input is currently reachable without raising any error asynchronous version anbutton load msValidity Preloads the analog input cache with a specified validity duration anbutton load_async msValidity callback context Preloads the analog input cache with a specified validity duration asynchronous version anbutton nextAnButton Continues the enumeration of analog inputs started using yFirstAnButton anbutton gt registerValueCallback callback Registers the callback function that is invoked on every change of advertised value anbutton resetCounter Returns the pulse counter value as well as his timer anbutton set_analogCalibration newval Starts or stops the calibration process anbutton set_calibrationMax newval 3 Reference Changes the maximal calibration value for the input between 0 and 4095 included without actually starting the automated calibration anbutton set_calibrationMin newval Changes the minimal calibration value for the input between 0 and 4095 included without actually starting the automated calibration anbutton set_logicalName newval Changes the logical name of the analog input anbutton set_sensitivity newval Changes the sensibility for the input between 1 and 1000 for triggering user
11. hubport get_advertisedValue Returns the current value of the Yocto hub port no more than 6 characters hubport get_baudRate Returns the current baud rate used by this Yocto hub port in kbps hubport get_enabled Returns true if the Yocto hub port is powered false otherwise hubport get_errorMessage Returns the error message of the latest error with the Yocto hub port hubport get_errorType Returns the numerical error code of the latest error with the Yocto hub port hubport get_friendlyName Returns a global identifier of the Yocto hub port in the format MODULE_NAME FUNCT ION_NAME hubport get_functionDescriptor Returns a unique identifier of type YF UN_DESCR corresponding to the function hubport get_functionld Returns the hardware identifier of the Yocto hub port without reference to the module hubport get_hardwareld Returns the unique hardware identifier of the Yocto hub port in the form SERIAL FUNCTIONID hubport get_logicalName Returns the logical name of the Yocto hub port 3 Reference hubport get_module Gets the YModule object for the device on which the function is located hubport get_module_async callback context Gets the YModule object for the device on which the function is located asynchronous version hubport get_portState Returns the current state of the Yocto hub port hubport get_userData Returns the valu
12. load msValidity Preloads the gyroscope cache with a specified validity duration gyro loadCalibrationPoints rawValues refValues Retrieves error correction data points previously entered using the method calibrateFromPoints gyro load_async msValidity callback context Preloads the gyroscope cache with a specified validity duration asynchronous version gyro nextGyro Continues the enumeration of gyroscopes started using yFirstGyro gyro registerAnglesCallback callback Registers a callback function that will be invoked each time that the estimated device orientation has changed gyro registerQuaternionCallback callback Registers a callback function that will be invoked each time that the estimated device orientation has changed gyro registerTimedReportCallback callback Registers the callback function that is invoked on every periodic timed notification gyro registerValueCallback callback Registers the callback function that is invoked on every change of advertised value gyro set_highestValue newval Changes the recorded maximal value observed gyro set_logFrequency newval Changes the datalogger recording frequency for this function gyro set_logicalName newval Changes the logical name of the gyroscope gyro set_lowestValue newval Changes the recorded minimal value observed gyro set_reportFrequency newval Changes the timed value notification frequency for this function gyro set_r
13. wireless get_functionDescriptor Returns a unique identifier of type YF UN_DESCR corresponding to the function wireless get_functionld Returns the hardware identifier of the wireless lan interface without reference to the module wireless get_hardwareld Returns the unique hardware identifier of the wireless lan interface in the form SERIAL FUNCTIONID 3 Reference wireless get_linkQuality Returns the link quality expressed in percent wireless get_logicalName Returns the logical name of the wireless lan interface wireless get_message Returns the latest status message from the wireless interface wireless get_module Gets the YModule object for the device on which the function is located wireless get_module_async callback context Gets the YModule object for the device on which the function is located asynchronous version wireless get_security Returns the security algorithm used by the selected wireless network wireless get_ssid Returns the wireless network name SSID wireless get_userData Returns the value of the userData attribute as previously stored using method set_userData wireless isOnline Checks if the wireless lan interface is currently reachable without raising any error wireless isOnline_async callback context Checks if the wireless lan interface is currently reachable without raising any error asynchronous version wirel
14. yoctolib YAPI var YModule yoctolib YModule require_once yocto_api php include yocto_api h import yocto_api h uses yocto_api yocto_api vb yocto_api cs import com yoctopuce YoctoAPI YModule from yocto_api import YDataSet methods dataset get_endTimeUTC Returns the end time of the dataset relative to the Jan 1 1970 dataset get_functionld Returns the hardware identifier of the function that performed the measure without reference to the module dataset get_hardwareld Returns the unique hardware identifier of the function who performed the measures in the form SERIAL FUNCTIONID dataset get_measures Returns all measured values currently available for this DataSet as a list of YMeasure objects dataset get_preview Returns a condensed version of the measures that can retrieved in this YDataSet as a list of YMeasure objects dataset get_progress Returns the progress of the downloads of the measures from the data logger on a scale from 0 to 100 dataset get_startTimeUTC Returns the start time of the dataset relative to the Jan 1 1970 dataset get_summary Returns an YMeasure object which summarizes the whole DataSet dataset get_unit Returns the measuring unit for the measured value 3 Reference dataset loadMore Loads the the next block of measures from the dataLogger and updates the progress indicator dataset loadMore_async cal
15. Changes the logical name of the accelerometer accelerometer set_lowestValue newval Changes the recorded minimal value observed accelerometer set_reportFrequency newval Changes the timed value notification frequency for this function accelerometer set_resolution newval Changes the resolution of the measured physical values accelerometer set_userData data Stores a user context provided as argument in the userData attribute of the function accelerometer wait_async callback context Waits for all pending asynchronous commands on the module to complete and invoke the user provided callback function 3 Reference 3 3 Altitude function interface The Yoctopuce application programming interface allows you to read an instant measure of the sensor as well as the minimal and maximal values observed In order to use the functions described here you should include lt script type text javascript src yocto_altitude js gt lt script gt var yoctolib require yoctolib var YAltitude yoctolib YAltitude require_once yocto_altitude php include yocto_altitude h import yocto_altitude h uses yocto_altitude yocto_altitude vb yocto_altitude cs import com yoctopuce YoctoAPI YAltitude from yocto_altitude import Global functions yFindAltitude func Retrieves an altimeter for a given identifier yFirstAltitude Starts the enumeration of altimeters currently accessible YA1tit
16. Returns the unique hardware identifier of the tilt sensor in the form SERIAL FUNCTIONID 3 Reference tilt gt get_highestValue Returns the maximal value observed for the inclination since the device was started tilt gt get_logFrequency Returns the datalogger recording frequency for this function or OFF when measures are not stored in the data logger flash memory tilt gt get_logicalName Returns the logical name of the tilt sensor tilt gt get_lowestValue Returns the minimal value observed for the inclination since the device was started tilt gt get_module Gets the YModule object for the device on which the function is located tilt gt get_module_async callback context Gets the YModule object for the device on which the function is located asynchronous version tilt gt get_recordedData startTime endTime Retrieves a DataSet object holding historical data for this sensor for a specified time interval tilt gt get_reportFrequency Returns the timed value notification frequency or OFF if timed value notifications are disabled for this function tilt gt get_resolution Returns the resolution of the measured values tilt gt get_unit Returns the measuring unit for the inclination tilt gt get_userData Returns the value of the userData attribute as previously stored using method set_userData tiltisOnline Checks if the tilt sensor is currently reachable without raising any error
17. genericsensor set_valueRange newval Changes the physical value range measured by the sensor genericsensor wait_async callback context Waits for all pending asynchronous commands on the module to complete and invoke the user provided callback function genericsensor zeroAdjust Adjusts the signal bias so that the current signal value is need precisely as zero 3 Reference 3 19 Gyroscope function interface The Yoctopuce application programming interface allows you to read an instant measure of the sensor as well as the minimal and maximal values observed In order to use the functions described here you should include lt script type text javascript src yocto_gyro js gt lt script gt var yoctolib require yoctolib var YGyro yoctolib YGyro require_once yocto_gyro php include yocto_gyro h import yocto_gyro h uses yocto_gyro yocto_gyro vb yocto_gyro cs import com yoctopuce YoctoAPI Y Gyro from yocto_gyro import Global functions yFindGyro func Retrieves a gyroscope for a given identifier yFirstGyro Starts the enumeration of gyroscopes currently accessible YGyro methods gyro gt calibrateFromPoints rawValues refValues Configures error correction data points in particular to compensate for a possible perturbation of the measure caused by an enclosure gyro describe Returns a short text that describes unambiguously the instance of the gyroscope in the for
18. get_errorMessage Returns the error message of the latest error with the display 3 Reference display get_errorType Returns the numerical error code of the latest error with the display display get_friendlyName Returns a global identifier of the display in the format MODULE_NAME FUNCTION_NAME display get_functionDescriptor Returns a unique identifier of type YF UN_DESCR corresponding to the function display get_functionld Returns the hardware identifier of the display without reference to the module display get_hardwareld Returns the unique hardware identifier of the display in the form SERIAL FUNCTIONID display get_layerCount Returns the number of available layers to draw on display get_layerHeight Returns the height of the layers to draw on in pixels display get_layerWidth Returns the width of the layers to draw on in pixels display get_logicalName Returns the logical name of the display display get_module Gets the YModule object for the device on which the function is located display get_module_async callback context Gets the YModule object for the device on which the function is located asynchronous version display get_orientation Returns the currently selected display orientation display get_startupSeq Returns the name of the sequence to play when the displayed is powered on display get_userData R
19. get_errorMessage Returns the error message of the latest error with the pressure sensor pressure get_errorType Returns the numerical error code of the latest error with the pressure sensor pressure get_friendlyName Returns a global identifier of the pressure sensor in the format MODULE_NAME FUNCTION_NAME pressure get_functionDescriptor Returns a unique identifier of type YF UN_DESCR corresponding to the function pressure get_functionld Returns the hardware identifier of the pressure sensor without reference to the module pressure get_hardwareld 3 Reference Returns the unique hardware identifier of the pressure sensor in the form SERIAL FUNCTIONID pressure get_highestValue Returns the maximal value observed for the pressure since the device was started pressure get_logFrequency Returns the datalogger recording frequency for this function or OFF when measures are not stored in the data logger flash memory pressure get_logicalName Returns the logical name of the pressure sensor pressure get_lowestValue Returns the minimal value observed for the pressure since the device was started pressure get_module Gets the YModule object for the device on which the function is located pressure get_module_async callback context Gets the YModule object for the device on which the function is located asynchronous versio
20. get_logicalName Returns the logical name of the Volatile Organic Compound sensor voc get_lowestValue Returns the minimal value observed for the estimated VOC concentration since the device was started voc get_module Gets the YModule object for the device on which the function is located voc get_module_async callback context Gets the YModule object for the device on which the function is located asynchronous version voc get_recordedData startTime endTime Retrieves a DataSet object holding historical data for this sensor for a specified time interval voc get_reportFrequency Returns the timed value notification frequency or OFF if timed value notifications are disabled for this function voc get_resolution Returns the resolution of the measured values voc get_unit Returns the measuring unit for the estimated VOC concentration voc get_userData Returns the value of the userData attribute as previously stored using method set_userData voc isOnline Checks if the Volatile Organic Compound sensor is currently reachable without raising any error voc isOnline_async callback context Checks if the Volatile Organic Compound sensor is currently reachable without raising any error asynchronous version voc load msValidity Preloads the Volatile Organic Compound sensor cache with a specified validity duration voc loadCalibrationPoints rawValues refValues Retrie
21. humidity get_errorType Returns the numerical error code of the latest error with the humidity sensor humidity get_friendlyName Returns a global identifier of the humidity sensor in the format MODULE_NAME FUNCTION_NAME humidity get_functionDescriptor Returns a unique identifier of type YF UN_DESCR corresponding to the function humidity get_functionld Returns the hardware identifier of the humidity sensor without reference to the module humidity get_hardwareld Returns the unique hardware identifier of the humidity sensor in the form SERIAL FUNCTIONID 3 Reference humidity get_highestValue Returns the maximal value observed for the humidity since the device was started humidity get_logFrequency Returns the datalogger recording frequency for this function or OFF when measures are not stored in the data logger flash memory humidity get_logicalName Returns the logical name of the humidity sensor humidity get_lowestValue Returns the minimal value observed for the humidity since the device was started humidity gt get_module Gets the YModule object for the device on which the function is located humidity get_module_async callback context Gets the YModule object for the device on which the function is located asynchronous version humidity get_recordedData startTime endTime Retrieves a DataSet object holding historical data for this sensor for a
22. pressure registerValueCallback callback Registers the callback function that is invoked on every change of advertised value pressure set_highestValue newval Changes the recorded maximal value observed pressure set_logFrequency newval Changes the datalogger recording frequency for this function pressure set_logicalName newval 3 Reference Changes the logical name of the pressure sensor pressure set_lowestValue newval Changes the recorded minimal value observed pressure set_reportFrequency newval Changes the timed value notification frequency for this function pressure set_resolution newval Changes the resolution of the measured physical values pressure set_userData data Stores a user context provided as argument in the userData attribute of the function pressure wait_async callback context Waits for all pending asynchronous commands on the module to complete and invoke the user provided callback function 3 Reference 3 32 Pwminput function interface The Yoctopuce application programming interface allows you to read an instant measure of the sensor as well as the minimal and maximal values observed In order to use the functions described here you should include lt script type text javascript src yocto_pwminput js gt lt script gt var yoctolib require yoctolib var YPwmInput yoctolib YPwmlInput require_once yocto_pwminput php include yocto_pwminpu
23. relay get_countdown Returns the number of milliseconds remaining before a pulse delayedPulse call When there is no scheduled pulse returns zero relay get_errorMessage Returns the error message of the latest error with the relay relay get_errorType Returns the numerical error code of the latest error with the relay relay get_friendlyName Returns a global identifier of the relay in the format MODULE_NAME FUNCTION_NAME relay get_functionDescriptor Returns a unique identifier of type YF UN_DESCR corresponding to the function relay get_functionld Returns the hardware identifier of the relay without reference to the module relay get_hardwareld 3 Reference Returns the unique hardware identifier of the relay in the form SERIAL FUNCTIONID relay get_logicalName Returns the logical name of the relay relay get_maxTimeOnStateA Retourne the maximum time ms allowed for THEFUNCTIONS to stay in state A before automatically switching back in to B state relay get_maxTimeOnStateB Retourne the maximum time ms allowed for THEFUNCTIONS to stay in state B before automatically switching back in to A state relay get_module Gets the YModule object for the device on which the function is located relay get_module_async callback context Gets the YModule object for the device on which the function is located asynchronous version
24. the libraries function in a strictly identical manner if you integrate them in an application with a graphical interface You can find on Yoctopuce blog a detailed example with video shots showing how to integrate the library into your projects 2 1 Control of the Led function Launch Xcode 4 2 and open the corresponding sample project provided in the directory Examples Doc GettingStarted Yocto Demo of the Yoctopuce library import lt Foundation Foundation h gt import yocto_api h import yocto led h static void usage void NSiog usage demo lt serial number gt von ofr u NSLog demo lt illogutcalliname gt ont sofa NSLog demo any on off use any dilscovered device ezaren 1 www yoctopuce com EN libraries php 2 www yoctopuce com EN article new objective c library for mac os x www yoctopuce com 3 2 Using Yocto Demo with Objective C int mamine acoe const char acow NSError error re fal cbt cy CaS usage autoreleasepool NSSituing ranuget NSString on_off NSString stringWithUTF8String argv 1 NSString stringWithUTF8String argv 2 YLed led if YAPI RegisterHub usb amp error YAPI SUCCESS NSiogi Regisierhibvercor 20 error localizedDeseripkron i return 1 if target isEqualToString any led YLed FirstLed felse led YLed FindLed target stringByAppendingString led if l
25. wakeupmonitor get_nextWakeUp 3 Reference Returns the next scheduled wake up date time UNIX format wakeupmonitor get_powerDuration Returns the maximal wake up time in seconds before automatically going to sleep wakeupmonitor get_sleepCountdown Returns the delay before the next sleep period wakeupmonitor get_userData Returns the value of the userData attribute as previously stored using method set_userData wakeupmonitor get_wakeUpReason Returns the latest wake up reason wakeupmonitor get_wakeUpState Returns the current state of the monitor wakeupmonitor isOnline Checks if the monitor is currently reachable without raising any error wakeupmonitor isOnline_async callback context Checks if the monitor is currently reachable without raising any error asynchronous version wakeupmonitor load msValidity Preloads the monitor cache with a specified validity duration wakeupmonitor load_async msValidity callback context Preloads the monitor cache with a specified validity duration asynchronous version wakeupmonitor nextWakeUpMonitor Continues the enumeration of monitors started using yF irstWakeUpMonitor wakeupmonitor registerValueCallback callback Registers the callback function that is invoked on every change of advertised value wakeupmonitor resetSleepCountDown Resets the sleep countdown wakeupmonitor set_logicalName newval Changes the logical nam
26. you should include lt script type text javascript src yocto_power js gt lt script gt var yoctolib require yoctolib var YPower yoctolib Y Power require_once yocto_power php include yocto_power h import yocto_power h uses yocto_power v yocto_power vb cs _ yocto_power cs import com yoctopuce YoctoAPI YPower from yocto_power import Global functions yFindPower func Retrieves a electrical power sensor for a given identifier yFirstPower Starts the enumeration of electrical power sensors currently accessible YPower methods power gt calibrateFromPoints rawValues refValues Configures error correction data points in particular to compensate for a possible perturbation of the measure caused by an enclosure power describe Returns a short text that describes unambiguously the instance of the electrical power sensor in the form TYPE NAME SERIAL FUNCTIONID power get_advertisedValue Returns the current value of the electrical power sensor no more than 6 characters power get_cosPhi Returns the power factor the ratio between the real power consumed measured in W and the apparent power provided measured in VA power get_currentRawValue Returns the uncalibrated unrounded raw value returned by the sensor in Watt as a floating point number power get_currentValue Returns the current value of the electrical power in Watt
27. 45 Voltage function interface The Yoctopuce application programming interface allows you to read an instant measure of the sensor as well as the minimal and maximal values observed In order to use the functions described here you should include lt script type text javascript src yocto_voltage js gt lt script gt var yoctolib require yoctolib var YVoltage yoctolib Y Voltage require_once yocto_voltage php include yocto_voltage h import yocto_voltage h uses yocto_voltage yocto_voltage vb yocto_voltage cs import com yoctopuce YoctoAPI YVoltage from yocto_voltage import Global functions yFindVoltage func Retrieves a voltage sensor for a given identifier yFirstVoltage Starts the enumeration of voltage sensors currently accessible YVoltage methods voltage calibrateFromPoints rawValues refValues Configures error correction data points in particular to compensate for a possible perturbation of the measure caused by an enclosure voltage describe Returns a short text that describes unambiguously the instance of the voltage sensor in the form TYPE NAME SERIAL FUNCTIONID voltage get_advertisedValue Returns the current value of the voltage sensor no more than 6 characters voltage get_currentRawValue Returns the uncalibrated unrounded raw value returned by the sensor in Volt as a floating point number voltage get_currentValue Re
28. 9600 8N1 serialport set_userData data Stores a user context provided as argument in the userData attribute of the function serialport gt wait_async callback context Waits for all pending asynchronous commands on the module to complete and invoke the user provided callback function serialport writeArray byteList Sends a byte sequence provided as a list of bytes to the serial port serialport gt writeBin buff Sends a binary buffer to the serial port as is serialport gt writeHex hexString Sends a byte sequence provided as a hexadecimal string to the serial port serialport writeLine text Sends an ASCII string to the serial port followed by a line break CR LF serialport gt writeMODBUS hexString Sends a MODBUS message provided as a hexadecimal string to the serial port serialport writeStr text 3 Reference Sends an ASCII string to the serial port as is 3 Reference 3 41 Servo function interface Yoctopuce application programming interface allows you not only to move a servo to a given position but also to specify the time interval in which the move should be performed This makes it possible to synchronize two servos involved in a same move In order to use the functions described here you should include lt script type text javascript src yocto_servo js gt lt script gt var yoctolib require yoctolib var YServo yoctolib YServo require_once yocto_servo php
29. E Error 7 External 50 F Files 52 Formatted 36 Frame 105 Functions 11 G General 11 GenericSensor 54 get_startTimeUTC YDataRun 36 Gyroscope 57 H Humidity 62 Interface 13 16 19 22 25 27 30 33 42 45 48 50 52 54 57 60 62 65 67 70 74 77 80 86 89 92 95 98 100 103 108 111 114 118 121 124 127 130 133 135 138 141 144 Introduction 1 L LightSensor 67 Magnetometer 70 Measured 73 Module 5 74 Motor 77 N Network 80 O Object 48 Objective C 3 P Port 60 Power 50 86 Pressure 89 Pwminput 92 PwmPowerSource 98 Q Quaternion 100 R Real 103 Recorded 38 Reference 10 105 Relay 108 S Sensor 111 Sequence 36 38 40 SerialPort 114 Servo 118 Source 133 Supply 50 T Temperature 121 Tit 124 Time 103 Unformatted 40 V Watchdog 141 Wireless 144 Value 73 Voltage 130 133 Y W YDataRun 36 Yocto Demo 3 WakeUpMonitor 135 Yocto hub 60 WakeUpSchedule 138
30. Global functions yFindLed func Retrieves a led for a given identifier yFirstLed Starts the enumeration of leds currently accessible YLed methods led describe Returns a short text that describes unambiguously the instance of the led in the form TYPE NAME SERIAL FUNCTIONID led get_advertisedValue Returns the current value of the led no more than 6 characters led get_blinking Returns the current led signaling mode led get_errorMessage Returns the error message of the latest error with the led led get_errorType Returns the numerical error code of the latest error with the led led get_friendlyName Returns a global identifier of the led in the format MODULE_NAME FUNCTION_NAME led get_functionDescriptor Returns a unique identifier of type YF UN_DESCR corresponding to the function led get_functionld Returns the hardware identifier of the led without reference to the module led get_hardwareld Returns the unique hardware identifier of the led in the form SERIAL FUNCTIONID led get_logicalName Returns the logical name of the led led get_luminosity Returns the current led intensity in per cent led get_module 3 Reference Gets the YModule object for the device on which the function is located led get_module_async callback context Gets the YModule object for the device on which the function is located asynchronous version led
31. YGyro yoctolib Gyro require_once yocto_gyro php cpp _ include yocto_gyro h import yocto_gyro h uses yocto_gyro vb _ yocto_gyro vb cs _ yocto_gyro cs import com yoctopuce YoctoAPI YGyro from yocto_gyro import Global functions yFindQt func Retrieves a quaternion component for a given identifier yFirstQt Starts the enumeration of quaternion components currently accessible Yot methods qt calibrateFromPoints rawValues refValues Configures error correction data points in particular to compensate for a possible perturbation of the measure caused by an enclosure qt describe Returns a short text that describes unambiguously the instance of the quaternion component in the form TYPE NAME SERIAL FUNCTIONID qt get_advertisedValue Returns the current value of the quaternion component no more than 6 characters qt get_currentRawValue Returns the uncalibrated unrounded raw value returned by the sensor in units as a floating point number qt get_currentValue Returns the current value of the value in units as a floating point number qt get_errorMessage Returns the error message of the latest error with the quaternion component qt get_errorType Returns the numerical error code of the latest error with the quaternion component qt get_friendlyName Returns a global identifier of the quaternion component in the format MODULE_NAME FUNCT
32. can request them from the object which returned the error calling the errType and errMessage methods Their returned values contain the same information as in the exceptions when they are active www yoctopuce com 7 www yoctopuce com www yoctopuce com 3 Reference 3 Reference 3 1 General functions These general functions should be used to initialize and configure the Yoctopuce library In most cases a simple call to function yRegisterHub should be enough The module specific functions yFind or yFirst should then be used to retrieve an object that provides interaction with the module In order to use the functions described here you should include lt script type text javascript src yocto_api js gt lt script gt var yoctolib require yoctolib var YAPI yoctolib YAPI var YModule yoctolib YModule require_once yocto_api php include yocto_api h import yocto_api h uses yocto_api yocto_api vb yocto_api cs import com yoctopuce YoctoAPI YModule from yocto_api import Global functions yCheckLogicalName name Checks if a given string is valid as logical name for a module or a function yDisableExceptions Disables the use of exceptions to report runtime errors yEnableExceptions Re enables the use of exceptions for runtime error handling yEnableUSBHost osContext This function is used only on Android yFreeAPI Frees dynamically allocated memory
33. generic sensor cache with a specified validity duration asynchronous version genericsensor nextGenericSensor Continues the enumeration of generic sensors started using yF irstGenericSensor 3 Reference genericsensor registerTimedReportCallback callback Registers the callback function that is invoked on every periodic timed notification genericsensor registerValueCallback callback Registers the callback function that is invoked on every change of advertised value genericsensor set_highestValue newval Changes the recorded maximal value observed genericsensor set_logFrequency newval Changes the datalogger recording frequency for this function genericsensor set_logicalName newval Changes the logical name of the generic sensor genericsensor set_lowestValue newval Changes the recorded minimal value observed genericsensor set_reportFrequency newval Changes the timed value notification frequency for this function genericsensor set_resolution newval Changes the resolution of the measured physical values genericsensor set_signalBias newval Changes the electric signal bias for zero shift adjustment genericsensor set_signalRange newval Changes the electric signal range used by the sensor genericsensor set_unit newval Changes the measuring unit for the measured value genericsensor set_userData data Stores a user context provided as argument in the userData attribute of the function
34. get_power Returns the current led state led get_userData Returns the value of the userData attribute as previously stored using method set_userData led isOnline Checks if the led is currently reachable without raising any error led isOnline_async callback context Checks if the led is currently reachable without raising any error asynchronous version led load msValidity Preloads the led cache with a specified validity duration led load_async msValidity callback context Preloads the led cache with a specified validity duration asynchronous version led nextLed Continues the enumeration of leds started using yFirstLed led registerValueCallback callback Registers the callback function that is invoked on every change of advertised value led set_blinking newval Changes the current led signaling mode led set_logicalName newval Changes the logical name of the led led set_luminosity newval Changes the current led intensity in per cent led set_power newval Changes the state of the led led set_userData data Stores a user context provided as argument in the userData attribute of the function led wait_async callback context Waits for all pending asynchronous commands on the module to complete and invoke the user provided callback function 3 Reference 3 23 LightSensor function interface The Yoctopuce application programming interface allows you to rea
35. get_unit Returns the measuring unit for the measure sensor get_userData Returns the value of the userData attribute as previously stored using method set_userData sensor isOnline Checks if the sensor is currently reachable without raising any error sensor isOnline_async callback context Checks if the sensor is currently reachable without raising any error asynchronous version sensor load msValidity Preloads the sensor cache with a specified validity duration sensor loadCalibrationPoints rawValues refValues Retrieves error correction data points previously entered using the method calibrateFromPoints sensor load_async msvValidity callback context Preloads the sensor cache with a specified validity duration asynchronous version sensor nextSensor Continues the enumeration of sensors started using yFirstSensor sensor registerTimedReportCallback callback Registers the callback function that is invoked on every periodic timed notification sensor registerValueCallback callback Registers the callback function that is invoked on every change of advertised value sensor set_highestValue newval Changes the recorded maximal value observed sensor set_logFrequency newval Changes the datalogger recording frequency for this function sensor set_logicalName newval 3 Reference Changes the logical name of the sensor sensor set_lowestValue newval Changes the reco
36. if the filesystem is currently reachable without raising any error asynchronous version files gt load msValidity Preloads the filesystem cache with a specified validity duration files gt load_async msValidity callback context Preloads the filesystem cache with a specified validity duration asynchronous version files nextFiles Continues the enumeration of filesystems started using yFirstFiles filesregisterValueCallback callback Registers the callback function that is invoked on every change of advertised value files gt remove pathname Deletes a file given by its full path name from the filesystem files gt set_logicalName newval Changes the logical name of the filesystem files set_userData data Stores a user context provided as argument in the userData attribute of the function files gt upload pathname content Uploads a file to the filesystem to the specified full path name files gt wait_async callback context Waits for all pending asynchronous commands on the module to complete and invoke the user provided callback function 3 Reference 3 18 GenericSensor function interface The Yoctopuce application programming interface allows you to read an instant measure of the sensor as well as the minimal and maximal values observed In order to use the functions described here you should include lt script type text javascript src yocto_genericsensor js gt lt script gt var yoctol
37. more than 6 characters colorled get_errorMessage Returns the error message of the latest error with the RGB led colorled get_errorType Returns the numerical error code of the latest error with the RGB led colorled get_friendlyName Returns a global identifier of the RGB led in the format MODULE_NAME FUNCTION_NAME colorled get_functionDescriptor Returns a unique identifier of type YF UN_DESCR corresponding to the function colorled get_functionld Returns the hardware identifier of the RGB led without reference to the module colorled get_hardwareld Returns the unique hardware identifier of the RGB led in the form SERTAL FUNCTIONID colorled get_hsIColor Returns the current HSL color of the led colorled get_logicalName Returns the logical name of the RGB led 3 Reference colorled get_module Gets the YModule object for the device on which the function is located colorled get_module_async callback context Gets the YModule object for the device on which the function is located asynchronous version colorled get_rgbColor Returns the current RGB color of the led colorled get_rgbColorAtPowerOn Returns the configured color to be displayed when the module is turned on colorled get_userData Returns the value of the userData attribute as previously stored using method set_userData colorled hsIMove hsl_target ms_duration
38. on the USB bus in milli amps module gt get_userData Returns the value of the userData attribute as previously stored using method set_userData module gt get_userVar Returns the value previously stored in this attribute module gt isOnline Checks if the module is currently reachable without raising any error module gt isOnline_async callback context Checks if the module is currently reachable without raising any error module load msValidity Preloads the module cache with a specified validity duration module load_async msValidity callback context Preloads the module cache with a specified validity duration asynchronous version module nextModule Continues the module enumeration started using yFirstModule module gt reboot secBeforeReboot Schedules a simple module reboot after the given number of seconds module registerLogCallback callback Registers a device log callback function 3 Reference module gt revertFromFlash Reloads the settings stored in the nonvolatile memory as when the module is powered on module saveToFlash Saves current settings in the nonvolatile memory of the module module set_allSettings settings Restore all the setting of the module module set_beacon newval Turns on or off the module localization beacon module set_logicalName newval Changes the logical name of the module module set_luminosity newval Changes the luminosity
39. programming interface allows you to read an instant measure of the sensor as well as the minimal and maximal values observed In order to use the functions described here you should include lt script type text javascript src yocto_magnetometer js gt lt script gt var yoctolib require yoctolib var YMagnetometer yoctolib YMagnetometer require_once yocto_magnetometer php include yocto_magnetometer h import yocto_magnetometer h uses yocto_magnetometer yocto_magnetometer vb yocto_magnetometer cs import com yoctopuce YoctoAPI YMagnetometer from yocto_magnetometer import Global functions yFindMagnetometer func Retrieves a magnetometer for a given identifier yFirstMagnetometer Starts the enumeration of magnetometers currently accessible YMagnetometer methods magnetometer calibrateFromPoints rawValues refValues Configures error correction data points in particular to compensate for a possible perturbation of the measure caused by an enclosure magnetometer describe Returns a short text that describes unambiguously the instance of the magnetometer in the form TYPE NAME SERIAL FUNCTIONID magnetometer get_advertisedValue Returns the current value of the magnetometer no more than 6 characters magnetometer get_currentRawValue Returns the uncalibrated unrounded raw value returned by the sensor in mT as a floating point number magnetometer get_currentVa
40. r innate eat Ace ie 36 3 11 Recorded data SCQUGNCE 000 eee cceeeeseeeesseeeeeceenetecnaneeeeaeeceeaaeaeneaaeeeeasaeenenenenesseneneeseneeeeaas 38 3 12 Unformatted data sequence ou eee eeeceeeteeeeeeneeee settee eteaeeeeteaeeeeteaeeeeteaaeeeseeeeeeseeeeetseeeeeeaes 40 3 13 Digital IO function interface oo eee ees seeeeeeeeeeeeeeeee senses ceeneneeeenaneeeensgeeeeneaeeneeeeeneeseneeeesas 42 3 14 Display function interface oo eee ceeeesceeeeeeeeeeeeeneeeeeeneceeaneeeenaneeeenaaeeneneeeneeseneneeseneeeeaas 45 3 15 DisplayLayer object interface oo ees seeeeeseneeeeeenee cesses ceeeaneceeaneeeensaeeeeneaeeneseieenesseneeeesas 48 3 16 External power supply Control interface ooo eeeceeeeeeeeeeeeseneeeeesneeeeteaeeeeseaaeeeseaeeeseeneeeeeas 50 3 17 Files tunction Intenace a ntcniwdiienn ene ani ee oe 52 3 18 GenericSensor function interface oo eee ee eeeeeeetenee cette eee eeaeeeeteaaeeeeeeaeeeeetaeeeeeeneeeeteneeeeeias 54 3 19 Gyroscope TUNGHOM IMG MACE ie ninii e e erent ne a aiita 57 3 20 Yocto hub port interface pira a a aa e a ea dA E 60 3 21 Humidity T ncti n interlace a a ce eee 62 3 22 bed Tunctlonintenace a Bc tected ee aie o aa Taaa Mes Be Rte ee eee 65 3 23 LightSensor function interface eee eee e cence ee tetteeeeeeneeeeteaeeeeteaeeeeteneeeeseaeeeeseaaeeeseeeeeeey 67 3 24 Magnetometer function interface oo ee eeeeee tenn ee eeeneeeeeeeeeeeeeeeeteaeeeeteaeaeeteaaeeeeeeeeerey 70 3 25 Measured Value ciicaddd ait i
41. switching back in to A state watchdog set_output newval Changes the output state of the watchdog when used as a simple switch single throw watchdog set_running newval Changes the running state of the watchdog watchdog set_state newval Changes the state of the watchdog A for the idle position B for the active position watchdog set_stateAtPowerOn newval Preset the state of the watchdog at device startup A for the idle position B for the active position UNCHANGED for no modification watchdog set_triggerDelay newval Changes the waiting delay before a reset is triggered by the watchdog in milliseconds watchdog set_triggerDuration newval Changes the duration of resets caused by the watchdog in milliseconds watchdog set_userData data Stores a user context provided as argument in the userData attribute of the function watchdog wait_async callback context Waits for all pending asynchronous commands on the module to complete and invoke the user provided callback function 3 Reference 3 50 Wireless function interface YWireless functions provides control over wireless network parameters and status for devices that are wireless enabled In order to use the functions described here you should include lt script type text javascript src yocto_wireless js gt lt script gt var yoctolib require yoctolib var YWireless yoctolib YWireless require_once yocto_wireless php
42. the function is located asynchronous version realtimeclock get_timeSet Returns true if the clock has been set and false otherwise realtimeclock get_unixTime Returns the current time in Unix format number of elapsed seconds since Jan 1st 1970 realtimeclock get_userData Returns the value of the userData attribute as previously stored using method set_userData realtimeclock get_utcOffset Returns the number of seconds between current time and UTC time time zone realtimeclock isOnline Checks if the clock is currently reachable without raising any error realtimeclock isOnline_async callback context Checks if the clock is currently reachable without raising any error asynchronous version realtimeclock load msValidity Preloads the clock cache with a specified validity duration realtimeclock load_async msValidity callback context Preloads the clock cache with a specified validity duration asynchronous version realtimeclock nextRealTimeClock Continues the enumeration of clocks started using yFirstRealTimeClock realtimeclock registerValueCallback callback Registers the callback function that is invoked on every change of advertised value realtimeclock set_logicalName newval Changes the logical name of the clock realtimeclock set_unixTime newval Changes the current time realtimeclock set_userData data Stores a user context provided as argument in the userData attri
43. the instance of the OS control in the form TYPE NAME SERIAL FUNCTIONID oscontrol get_advertisedValue Returns the current value of the OS control no more than 6 characters oscontrol get_errorMessage Returns the error message of the latest error with the OS control oscontrol get_errorType Returns the numerical error code of the latest error with the OS control oscontrol get_friendlyName Returns a global identifier of the OS control in the format MODULE_NAME FUNCTION_NAME oscontrol get_functionDescriptor Returns a unique identifier of type YF UN_DESCR corresponding to the function oscontrol get_functionld Returns the hardware identifier of the OS control without reference to the module oscontrol get_hardwareld Returns the unique hardware identifier of the OS control in the form SERIAL FUNCTIONID oscontrol get_logicalName Returns the logical name of the OS control oscontrol get_module Gets the YModule object for the device on which the function is located oscontrolget_module_async callback context 3 Reference Gets the YModule object for the device on which the function is located asynchronous version oscontrolget_shutdownCountdown Returns the remaining number of seconds before the OS shutdown or zero when no shutdown has been scheduled oscontrol get_userData Returns the value of the userData attribute a
44. the latest error with the digital IO port digitalio get_friendlyName Returns a global identifier of the digital IO port in the format MODULE_NAME FUNCT ION_NAMI Gl 3 Reference digitalio get_functionDescriptor Returns a unique identifier of type YF UN_DESCR corresponding to the function digitalio get_functionld Returns the hardware identifier of the digital IO port without reference to the module digitalio get_hardwareld Returns the unique hardware identifier of the digital IO port in the form SERIAL FUNCTIONID digitalio get_logicalName Returns the logical name of the digital IO port digitalio gt get_module Gets the YModule object for the device on which the function is located digitalio gt get_module_async callback context Gets the YModule object for the device on which the function is located asynchronous version digitalio get_outputVoltage Returns the voltage source used to drive output bits digitalio get_portDirection Returns the IO direction of all bits of the port 0 makes a bit an input 1 makes it an output digitalio gt get_portOpenDrain Returns the electrical interface for each bit of the port digitalio get_portPolarity Returns the polarity of all the bits of the port digitalio get_portSize Returns the number of bits implemented in the I O port digitalio get_portState Returns the digital IO port state bit 0 represents i
45. the state of the PWM at device power on pwmoutput get_errorMessage Returns the error message of the latest error with the PWM pwmoutput get_errorType Returns the numerical error code of the latest error with the PWM pwmoutput get_frequency Returns the PWM frequency in Hz pwmoutput get_friendlyName Returns a global identifier of the PWM in the format MODULE_NAME FUNCTION_NAME pwmoutput get_functionDescriptor 3 Reference Returns a unique identifier of type YF UN_DESCR corresponding to the function pwmoutput get_functionld Returns the hardware identifier of the PWM without reference to the module pwmoutput get_hardwareld Returns the unique hardware identifier of the PWM in the form SERIAL FUNCTIONID pwmoutput get_logicalName Returns the logical name of the PWM pwmoutput get_module Gets the YModule object for the device on which the function is located pwmoutput get_module_async callback context Gets the YModule object for the device on which the function is located asynchronous version pwmoutput get_period Returns the PWM period in milliseconds pwmoutput get_pulseDuration Returns the PWM pulse length in milliseconds as a floating point number pwmoutput get_userData Returns the value of the userData attribute as previously stored using method set_userData pwmoutput isOnline Checks if the PWM is currently reachable without raising any e
46. tiltsisOnline_async callback context Checks if the tilt sensor is currently reachable without raising any error asynchronous version tiltsload msValidity Preloads the tilt sensor cache with a specified validity duration tilt gt loadCalibrationPoints rawValues refValues Retrieves error correction data points previously entered using the method calibrateFromPoints tiltsload_async msValidity callback context Preloads the tilt sensor cache with a specified validity duration asynchronous version tilt nextTilt Continues the enumeration of tilt sensors started using yFirstTilt tilt gt registerTimedReportCallback callback Registers the callback function that is invoked on every periodic timed notification tilt gt registerValueCallback callback Registers the callback function that is invoked on every change of advertised value tilt gt set_highestValue newval Changes the recorded maximal value observed tilt gt set_logFrequency newval Changes the datalogger recording frequency for this function tilt gt set_logicalName newval Changes the logical name of the tilt sensor 3 Reference tilt gt set_lowestValue newval Changes the recorded minimal value observed tilt gt set_reportFrequency newval Changes the timed value notification frequency for this function tilt gt set_resolution newval Changes the resolution of the measured physical values tilt gt set_userData data Stores a user context provide
47. with USB modules you cannot disregard error handling Inevitably there will be a time when a user will have unplugged the device either before running the software or even while the software is running The Yoctopuce library is designed to help you support this kind of behavior but your code must nevertheless be conceived to interpret in the best possible way the errors indicated by the library The simplest way to work around the problem is the one used in the short examples provided in this chapter before accessing a module check that it is online with the isOnline function and then hope that it will stay so during the fraction of a second necessary for the following code lines to run This method is not perfect but it can be sufficient in some cases You must however be aware that you cannot completely exclude an error which would occur after the call to isOnline and which could crash the software The only way to prevent this is to implement one of the two error handling techniques described below The method recommended by most programming languages for unpredictable error handling is the use of exceptions By default it is the behavior of the Yoctopuce library If an error happens while you try to access a module the library throws an exception In this case there are three possibilities e If your code catches the exception and handles it everything goes well e If your program is running in debug mode you can relatively easily det
48. with a specified validity duration asynchronous version power nextPower Continues the enumeration of electrical power sensors started using yFirstPower power gt registerTimedReportCallback callback Registers the callback function that is invoked on every periodic timed notification power gt registerValueCallback callback 3 Reference Registers the callback function that is invoked on every change of advertised value power gt reset Resets the energy counter power set_highestValue newval Changes the recorded maximal value observed power set_logFrequency newval Changes the datalogger recording frequency for this function power set_logicalName newval Changes the logical name of the electrical power sensor power set_lowestValue newval Changes the recorded minimal value observed power set_reportFrequency newval Changes the timed value notification frequency for this function power set_resolution newval Changes the resolution of the measured physical values power set_userData data Stores a user context provided as argument in the userData attribute of the function power wait_async callback context Waits for all pending asynchronous commands on the module to complete and invoke the user provided callback function 3 Reference 3 31 Pressure function interface The Yoctopuce application programming interface allows you to read an instant measure of the se
49. Configures error correction data points in particular to compensate for a possible perturbation of the measure caused by an enclosure accelerometer describe Returns a short text that describes unambiguously the instance of the accelerometer in the form TYPE NAME SERIAL FUNCTIONID accelerometer get_advertisedValue Returns the current value of the accelerometer no more than 6 characters accelerometer get_currentRawValue Returns the uncalibrated unrounded raw value returned by the sensor in g as a floating point number accelerometer get_currentValue Returns the current value of the acceleration in g as a floating point number accelerometer get_errorMessage Returns the error message of the latest error with the accelerometer accelerometer get_errorType Returns the numerical error code of the latest error with the accelerometer accelerometer get_friendlyName Returns a global identifier of the accelerometer in the format MODULE_NAME FUNCTION_NAME accelerometer get_functionDescriptor Returns a unique identifier of type YF UN_DESCR corresponding to the function accelerometer get_functionld Returns the hardware identifier of the accelerometer without reference to the module accelerometer get_hardwareld Returns the unique hardware identifier of the accelerometer in the form SERIAL FUNCTIONID 3 Reference accelerometer get_highestValue Returns the ma
50. Display yoctolib Display require_once yocto_display php include yocto_display h import yocto_display h uses yocto_display yocto_display vb yocto_display cs import com yoctopuce YoctoAPI Y Display from yocto_display import Global functions yFindDisplay func Retrieves a display for a given identifier yFirstDisplay Starts the enumeration of displays currently accessible YDisplay methods display copyLayerContent srcLayerld dstLayerld Copies the whole content of a layer to another layer display describe Returns a short text that describes unambiguously the instance of the display in the form TYPE NAME SERIAL FUNCTIONID display fade brightness duration Smoothly changes the brightness of the screen to produce a fade in or fade out effect display get_advertisedValue Returns the current value of the display no more than 6 characters display get_brightness Returns the luminosity of the module informative leds from 0 to 100 display get_displayHeight Returns the display height in pixels display get_displayLayer layerld Returns a YDisplayLayer object that can be used to draw on the specified layer display get_displayType Returns the display type monochrome gray levels or full color display get_displayWidth Returns the display width in pixels display get_enabled Returns true if the screen is powered false otherwise display
51. Gets the YModule object for the device on which the function is located vsource get_module_async callback context 3 Reference Gets the YModule object for the device on which the function is located asynchronous version vsource get_overCurrent Returns true if the appliance connected to the device is too greedy vsource get_overHeat Returns TRUE if the module is overheating vsource get_overLoad Returns true if the device is not able to maintaint the requested voltage output vsource get_regulationFailure Returns true if the voltage output is too high regarding the requested voltage vsource get_unit Returns the measuring unit for the voltage vsource get_userData Returns the value of the userData attribute as previously stored using method set_userData vsource get_voltage Returns the voltage output command mV vsource isOnline Checks if the function is currently reachable without raising any error vsource isOnline_async callback context Checks if the function is currently reachable without raising any error asynchronous version vsource load msValidity Preloads the function cache with a specified validity duration vsource load_async msValidity callback context Preloads the function cache with a specified validity duration asynchronous version vsource nextVSource Continues the enumeration of voltage sources started using yFirstVSource vsource
52. ION_NAME qt get_functionDescriptor Returns a unique identifier of type YF UN_DESCR corresponding to the function qt get_functionld Returns the hardware identifier of the quaternion component without reference to the module qt get_hardwareld 3 Reference Returns the unique hardware identifier of the quaternion component in the form SERIAL FUNCTIONID qt get_highestValue Returns the maximal value observed for the value since the device was started qt get_logFrequency Returns the datalogger recording frequency for this function or OFF when measures are not stored in the data logger flash memory qt get_logicalName Returns the logical name of the quaternion component qt get_lowestValue Returns the minimal value observed for the value since the device was started qt get_module Gets the YModule object for the device on which the function is located qt get_module_async callback context Gets the YModule object for the device on which the function is located asynchronous version qt get_recordedData startTime endTime Retrieves a DataSet object holding historical data for this sensor for a specified time interval qt get_reportFrequency Returns the timed value notification frequency or OFF if timed value notifications are disabled for this function qt get_resolution Returns the resolution of the measured values qt get_unit Ret
53. Led YCTOPOC1 123456 led YLed led Led FindLed YCTOPOC1 123456 MyFunction YLed led Led FindLed MyModule led YLed led Led FindLed MyModule MyFunction YLed led Led FindLed MyFunction Led FindLed returns an object which you can then use at will to control the led isOnline The isOnline method of the object returned by Led FindLed allows you to know if the corresponding module is present and in working order www yoctopuce com 2 Using Yocto Demo with Objective C set_power The set power function of the objet returned by YLed FindLed allows you to turn on and off the led The argument is YLed ROWER_ON or YLed POWER_OFF In the reference on the programming interface you will find more methods to precisely control the luminosity and make the led blink automatically 2 2 Control of the module part Each module can be controlled in a similar manner you can find below a simple sample program displaying the main parameters of the module and enabling you to activate the localization beacon import lt Foundation Foundation h gt import yocto_api h static void usage const char exe NSLog usage s lt serial or logical name gt ON OFF n exe exe ime maim ink arger const char argv ih NSError error autoreleasepool Setup the API to use local USB devices HE VARI Re gasisercHul Qn us ole ear e VAP SUCCESSI NSLog RegisterHub error err
54. NAME network get_functionDescriptor Returns a unique identifier of type YF UN_DESCR corresponding to the function network get_functionld Returns the hardware identifier of the network interface without reference to the module network get_hardwareld Returns the unique hardware identifier of the network interface in the form SERIAL FUNCTIONID network get_ipAddress Returns the IP address currently in use by the device network get_logicalName Returns the logical name of the network interface network gt get_macAddress Returns the MAC address of the network interface network gt get_module Gets the YModule object for the device on which the function is located network get_module_async callback context Gets the YModule object for the device on which the function is located asynchronous version network get_poeCurrent Returns the current consumed by the module from Power over Ethernet PoE in milli amps network get_primaryDNS Returns the IP address of the primary name server to be used by the module network get_readiness Returns the current established working mode of the network interface network get_router Returns the IP address of the router on the device subnet default gateway network get_secondaryDNS Returns the IP address of the secondary name server to be used by the module network get_subnetMask Returns the subnet mask currently u
55. Objective C API Reference Table of contents Ta UMW OGUCTIONS uires cients attain iad ler ating Patan atta een nah aie 1 2 Using Yocto Demo with Objective C oo esseeseestesteeseeseeseeseeseeseenee 3 2 1 Control of the Led UNCON isika iaeaea a aaae a e eea EE iaaa EE 3 22 C ntr l fth m d le part srr rn dite aden ae a ee 5 2 3 Errorandling isa ire e aaa a a a e a ene teete 7 Blueprint rereana e aeea e a ee aa aa aa ar a 10 Oy Reference ehee Sedat iene Alas a oasis ioe REE 10 3 1 General TUNCTIONS riiin este diese derau Ea ea a aaie AEA VAALA de EE al 11 3 2 Accelerometer function interface sssssssssisssrressrrnrsinrastrantrtrnstttnnttetantttanstnnantnananenanntnanae 13 3 3 Altitude function interface sssesssssesressrnrsssrnesstnnretrnnttennrtntnntrannnntnnnttnannntaatnenatnnaaceennnene 16 3 4 AnButton function interface oon eee ee eneeeeeeneeeeteaeeeeteaeeeeteaeaeeteaaaeeseeaaeesesaeeesenaeeeseneeeeteas 19 3 5 CarbonDioxide function interface esssssssissssirrerrrrrsirnsarrntsttrnstttnttttantiatnnenananennnetnanncenae 22 3 6 Col rLed f nctiominterf ce set e mae aie 25 3 7 Compass function interface o oo eee ceeseeeeeeeeeeeeeeeeeesesaaeeeeceaeeeeesaneeeesaeeeeesansenenaaeenensanenees 27 3 8 G rrent function interface neinn ae a aa a a a et 30 3 9 DataLogger function interface oo eee eee eeeee ee eneeeeeeeeeeeeeaeeeeteaeaeeteaaaeeseaaaeeseeeeeeesneeeeeeneeeeesas 33 3 10 Formatted data Sequence
56. Warning the number of write cycles of the nonvolatile memory of the module is limited When this limit is reached nothing guaranties that the saving process is performed correctly This limit linked to the technology employed by the module micro processor is located at about 100000 cycles In short you can use the saveToF lash function only 100000 times in the life of the module Make sure you do not call this function within a loop Listing the modules Obtaining the list of the connected modules is performed with the yFirstModule function which returns the first module found Then you only need to call the nextModule function of this object to find the following modules and this as long as the returned value is not NULL Below a short example listing the connected modules import lt Foundation Foundation h gt import yocto_api h int Mein int arge const char argy i NSError error 6 www yoctopuce com 2 Using Yocto Demo with Objective C autoreleasepool Setup the API to use local USB devices if YAPT RegisterHub usb amp error YAPI SUCCESS NSLog RegisterHub error n error localizedDescription return 1 NSLog Device list n YModule module YModule FirstModule while module nil NSLog 3 3 module serialNumber module productName module module nextModule return 0 2 3 Error handling When you implement a program which must interact
57. a points previously entered using the method calibrateFromPoints magnetometer load_async msValidity callback context Preloads the magnetometer cache with a specified validity duration asynchronous version magnetometer nextMagnetometer Continues the enumeration of magnetometers started using yFirstMagnetometer magnetometer registerTimedReportCallback callback Registers the callback function that is invoked on every periodic timed notification magnetometer registerValueCallback callback Registers the callback function that is invoked on every change of advertised value 3 Reference magnetometer set_highestValue newval Changes the recorded maximal value observed magnetometer set_logFrequency newval Changes the datalogger recording frequency for this function magnetometer set_logicalName newval Changes the logical name of the magnetometer magnetometer set_lowestValue newval Changes the recorded minimal value observed magnetometer set_reportFrequency newval Changes the timed value notification frequency for this function magnetometer set_resolution newval Changes the resolution of the measured physical values magnetometer set_userData data Stores a user context provided as argument in the userData attribute of the function magnetometer wait_async callback context Waits for all pending asynchronous commands on the module to complete and invoke the user provided callback
58. ace allows you to switch the relay state This change is not persistent the relay will automatically return to its idle position whenever power is lost or if the module is restarted The library can also generate automatically short pulses of determined duration On devices with two output for each relay double throw the two outputs are named A and B with output A corresponding to the idle position at power off and the output B corresponding to the active state If you prefer the alternate default state simply switch your cables on the board In order to use the functions described here you should include lt script type text javascript src yocto_relay js gt lt script gt var yoctolib require yoctolib var YRelay yoctolib Y Relay require_once yocto_relay php include yocto_relay h import yocto_relay h uses yocto_relay yocto_relay vb yocto_relay cs import com yoctopuce YoctoAPI YRelay from yocto_relay import Global functions yFindRelay func Retrieves a relay for a given identifier yFirstRelay Starts the enumeration of relays currently accessible YRelay methods relay delayedPulse ms_delay ms_duration Schedules a pulse relay describe Returns a short text that describes unambiguously the instance of the relay in the form TYPE NAME SERIAL FUNCTIONID relay get_advertisedValue Returns the current value of the relay no more than 6 characters
59. ack context Gets the YModule object for the device on which the function is located asynchronous version magnetometer get_recordedData startTime endTime Retrieves a DataSet object holding historical data for this sensor for a specified time interval magnetometer get_reportFrequency Returns the timed value notification frequency or OFF if timed value notifications are disabled for this function magnetometer get_resolution Returns the resolution of the measured values magnetometer get_unit Returns the measuring unit for the magnetic field magnetometer get_userData Returns the value of the userData attribute as previously stored using method set_userData magnetometer get_xValue Returns the X component of the magnetic field as a floating point number magnetometer get_yValue Returns the Y component of the magnetic field as a floating point number magnetometer get_zValue Returns the Z component of the magnetic field as a floating point number magnetometer isOnline Checks if the magnetometer is currently reachable without raising any error magnetometer isOnline_async callback context Checks if the magnetometer is currently reachable without raising any error asynchronous version magnetometer load msValidity Preloads the magnetometer cache with a specified validity duration magnetometer loadCalibrationPoints rawValues refValues Retrieves error correction dat
60. akeupschedule get_weekDays Returns the days of the week scheduled for wake up wakeupschedule isOnline Checks if the wake up schedule is currently reachable without raising any error wakeupschedule isOnline_async callback context Checks if the wake up schedule is currently reachable without raising any error asynchronous version wakeupschedule load msValidity Preloads the wake up schedule cache with a specified validity duration wakeupschedule load_async msValidity callback context Preloads the wake up schedule cache with a specified validity duration asynchronous version wakeupschedule nextWakeUpSchedule Continues the enumeration of wake up schedules started using yFirstWakeUpSchedule wakeupschedule registerValueCallback callback Registers the callback function that is invoked on every change of advertised value wakeupschedule set_hours newval Changes the hours when a wake up must take place wakeupschedule set_logicalName newval Changes the logical name of the wake up schedule wakeupschedule set_minutes bitmap Changes all the minutes where a wake up must take place wakeupschedule set_minutesA newval Changes the minutes in the 00 29 interval when a wake up must take place wakeupschedule set_minutesB newval Changes the minutes in the 30 59 interval when a wake up must take place wakeupschedule set_monthDays newval Changes the days of the month when a wake up must take place
61. alpower get_userData Returns the value of the userData attribute as previously stored using method set_userData dualpower isOnline Checks if the power control is currently reachable without raising any error dualpower isOnline_async callback context Checks if the power control is currently reachable without raising any error asynchronous version dualpower load msValidity Preloads the power control cache with a specified validity duration dualpower load_async msValidity callback context Preloads the power control cache with a specified validity duration asynchronous version dualpower nextDualPower Continues the enumeration of dual power controls started using yFirstDualPower dualpower registerValueCallback callback Registers the callback function that is invoked on every change of advertised value dualpower set_logicalName newval Changes the logical name of the power control dualpower set_powerControl newval Changes the selected power source for module functions that require lots of current dualpower set_userData data Stores a user context provided as argument in the userData attribute of the function dualpower wait_async callback context Waits for all pending asynchronous commands on the module to complete and invoke the user provided callback function 3 Reference 3 17 Files function interface The filesystem interface makes it possible to store file
62. alue relay set_logicalName newval Changes the logical name of the relay relay set_maxTimeOnStateA newval Sets the maximum time ms allowed for THEFUNCTIONSS to stay in state A before automatically switching back in to B state relay set_maxTimeOnStateB newval 3 Reference Sets the maximum time ms allowed for THEFUNCTIONSS to stay in state B before automatically switching back in to A state relay set_output newval Changes the output state of the relays when used as a simple switch single throw relay set_state newval Changes the state of the relays A for the idle position B for the active position relay set_stateAtPowerOn newval Preset the state of the relays at device startup A for the idle position B for the active position UNCHANGED for no modification relay set_userData data Stores a user context provided as argument in the userData attribute of the function relay wait_async callback context Waits for all pending asynchronous commands on the module to complete and invoke the user provided callback function 3 Reference 3 39 Sensor function interface The Yoctopuce application programming interface allows you to read an instant measure of the sensor as well as the minimal and maximal values observed In order to use the functions described here you should include lt script type text javascript src yocto_api js gt lt script gt var yoctolib require
63. any error asynchronous version pwmpowersource load msValidity Preloads the voltage source cache with a specified validity duration pwmpowersource load_async msValidity callback context Preloads the voltage source cache with a specified validity duration asynchronous version pwmpowersource nextPwmPowerSource Continues the enumeration of Voltage sources started using yF irst PwmPowerSource pwmpowersource gt registerValueCallback callback Registers the callback function that is invoked on every change of advertised value pwmpowersource set_logicalName newval Changes the logical name of the voltage source pwmpowersource set_powerMode newval Changes the PWM power source pwmpowersource set_userData data Stores a user context provided as argument in the userData attribute of the function pwmpowersource wait_async callback context Waits for all pending asynchronous commands on the module to complete and invoke the user provided callback function 3 Reference 3 35 Quaternion interface The Yoctopuce API YQt class provides direct access to the Yocto3D attitude estimation using a quaternion It is usually not needed to use the YQt class directly as the YGyro class provides a more convenient higher level interface In order to use the functions described here you should include lt script type text javascript src yocto_gyro js gt lt script gt var yoctolib require yoctolib var
64. as a floating point number power get_errorMessage Returns the error message of the latest error with the electrical power sensor power get_errorType Returns the numerical error code of the latest error with the electrical power sensor power get_friendlyName Returns a global identifier of the electrical power sensor in the format MODULE_NAME FUNCTION_NAMI GI power get_functionDescriptor Returns a unique identifier of type YF UN_DESCR corresponding to the function power get_functionld 3 Reference Returns the hardware identifier of the electrical power sensor without reference to the module power get_hardwareld Returns the unique hardware identifier of the electrical power sensor in the form SERIAL FUNCTIONID power get_highestValue Returns the maximal value observed for the electrical power since the device was started power get_logFrequency Returns the datalogger recording frequency for this function or OFF when measures are not stored in the data logger flash memory power get_logicalName Returns the logical name of the electrical power sensor power get_lowestValue Returns the minimal value observed for the electrical power since the device was started power get_meter Returns the energy counter maintained by the wattmeter by integrating the power consumption over time power get_meterTimer Returns the elapsed time since
65. ata attribute as previously stored using method set_userData watchdog gt isOnline Checks if the watchdog is currently reachable without raising any error watchdog isOnline_async callback context Checks if the watchdog is currently reachable without raising any error asynchronous version watchdog gt load msValidity Preloads the watchdog cache with a specified validity duration watchdog load_async msValidity callback context Preloads the watchdog cache with a specified validity duration asynchronous version watchdog nextWatchdog Continues the enumeration of watchdog started using yFirstWatchdog watchdog pulse ms_duration Sets the relay to output B active for a specified duration then brings it automatically back to output A idle state watchdog gt registerValueCallback callback Registers the callback function that is invoked on every change of advertised value 3 Reference watchdog gt resetWatchdog Resets the watchdog watchdog set_autoStart newval Changes the watchdog runningsttae at module power on watchdog set_logicalName newval Changes the logical name of the watchdog watchdog set_maxTimeOnStateA newval Sets the maximum time ms allowed for THEFUNCTIONSS to stay in state A before automatically switching back in to B state watchdog set_maxTimeOnStateB newval Sets the maximum time ms allowed for THEFUNCTIONSS to stay in state B before automatically
66. behaviour used by the consol eOut function displaylayer setLayerPosition x y scrollTime Sets the position of the layer relative to the display upper left corner displaylayer unhide Shows the layer 3 Reference 3 16 External power supply control interface Yoctopuce application programming interface allows you to control the power source to use for module functions that require high current The module can also automatically disconnect the external power when a voltage drop is observed on the external power source external battery running out of power In order to use the functions described here you should include lt script type text javascript src yocto_dualpower js gt lt script gt var yoctolib require yoctolib var YDualPower yoctolib YDualPower require_once yocto_dualpower php include yocto_dualpower h import yocto_dualpower h uses yocto_dualpower yocto_dualpower vb yocto_dualpower cs import com yoctopuce YoctoAP YDualPower from yocto_dualpower import Global functions yFindDualPower func Retrieves a dual power control for a given identifier yFirstDualPower Starts the enumeration of dual power controls currently accessible YDualPower methods dualpower describe Returns a short text that describes unambiguously the instance of the power control in the form TYPE NAME SERIAL FUNCTIONID dualpower get_advertisedValue Retu
67. bes unambiguously the instance of the CO2 sensor in the form TYPE NAME SERIAL FUNCTIONID carbondioxide get_advertisedValue Returns the current value of the CO2 sensor no more than 6 characters carbondioxide get_currentRawValue Returns the uncalibrated unrounded raw value returned by the sensor in ppm vol as a floating point number carbondioxide get_currentValue Returns the current value of the CO2 concentration in ppm vol as a floating point number carbondioxide get_errorMessage Returns the error message of the latest error with the CO2 sensor carbondioxide get_errorType Returns the numerical error code of the latest error with the CO2 sensor carbondioxide get_friendlyName Returns a global identifier of the CO2 sensor in the format MODULE_NAME FUNCTION_NAME carbondioxide get_functionDescriptor Returns a unique identifier of type YF UN_DESCR corresponding to the function carbondioxide get_functionld Returns the hardware identifier of the CO2 sensor without reference to the module carbondioxide get_hardwareld 3 Reference Returns the unique hardware identifier of the CO2 sensor in the form SERIAL FUNCTIONID carbondioxide get_highestValue Returns the maximal value observed for the CO2 concentration since the device was started carbondioxide get_logFrequency Returns the datalogger recording frequency for this function or OFF when measures are no
68. blocks used by the Yoctopuce library yGetAP Version Returns the version identifier for the Yoctopuce library in use yGetTickCount Returns the current value of a monotone millisecond based time counter yHandleEvents errmsg Maintains the device to library communication channel ylnitAPI mode errmsg Initializes the Yoctopuce programming library explicitly yPreregisterHub url errmsg Fault tolerant alternative to RegisterHub yRegisterDeviceArrivalCallback arrivalCallback Register a callback function to be called each time a device is plugged yRegisterDeviceRemovalCallback removalCallback Register a callback function to be called each time a device is unplugged yRegisterHub url errmsg Setup the Yoctopuce library to use modules connected on a given machine yRegisterHubDiscoveryCallback hubDiscoveryCallback 3 Reference Register a callback function to be called each time an Network Hub send an SSDP message yRegisterLogFunction logfun Registers a log callback function ySelectArchitecture arch Select the architecture or the library to be loaded to access to USB ySetDelegate object Objective C only Register an object that must follow the protocol YDeviceHotPlug ySetTimeout callback ms_timeout arguments Invoke the specified calloack function after a given timeout ySleep ms_duration errmsg Pauses the execution flow for a specified duration yTriggerHubDiscovery errmsg Force a
69. bute of the function realtimeclock set_utcOffset newval Changes the number of seconds between current time and UTC time time zone realtimeclock wait_async callback context Waits for all pending asynchronous commands on the module to complete and invoke the user provided callback function 3 Reference 3 37 Reference frame configuration This class is used to setup the base orientation of the Yocto 3D so that the orientation functions relative to the earth surface plane use the proper reference frame The class also implements a tridimensional sensor calibration process which can compensate for local variations of standard gravity and improve the precision of the tilt sensors In order to use the functions described here you should include lt script type text javascript src yocto_refframe js gt lt script gt var yoctolib require yoctolib var YRefFrame yoctolib YRefFrame require_once yocto_refframe php include yocto_refframe h import yocto_refframe h uses yocto_refframe yocto_refframe vb yocto_refframe cs import com yoctopuce YoctoAPI YRefFrame from yocto_refframe import Global functions yFindRefFrame func Retrieves a reference frame for a given identifier yFirstRefFrame Starts the enumeration of reference frames currently accessible YRefFrame methods refframe cancel3DCalibration Aborts the sensors tridimensional calibration process et restores normal setting
70. callbacks anbutton set_userData data Stores a user context provided as argument in the userData attribute of the function anbutton wait_async callback context Waits for all pending asynchronous commands on the module to complete and invoke the user provided callback function 3 Reference 3 5 CarbonDioxide function interface The Yoctopuce application programming interface allows you to read an instant measure of the sensor as well as the minimal and maximal values observed In order to use the functions described here you should include lt script type text javascript src yocto_carbondioxide js gt lt script gt var yoctolib require yoctolib var YCarbonDioxide yoctolib YCarbonDioxide require_once yocto_carbondioxide php include yocto_carbondioxide h import yocto_carbondioxide h uses yocto_carbondioxide yocto_carbondioxide vb yocto_carbondioxide cs import com yoctopuce YoctoAPI YCarbonDioxide from yocto_carbondioxide import Global functions yFindCarbonDioxide func Retrieves a CO2 sensor for a given identifier yFirstCarbonDioxide Starts the enumeration of CO2 sensors currently accessible YCarbonDioxide methods carbondioxide calibrateFromPoints rawValues refValues Configures error correction data points in particular to compensate for a possible perturbation of the measure caused by an enclosure carbondioxide describe Returns a short text that descri
71. corded minimal value observed qt set_reportFrequency newval Changes the timed value notification frequency for this function qt set_resolution newval Changes the resolution of the measured physical values qt set_userData data Stores a user context provided as argument in the userData attribute of the function qt wait_async callback context Waits for all pending asynchronous commands on the module to complete and invoke the user provided callback function 3 Reference 3 36 Real Time Clock function interface The RealTimeClock function maintains and provides current date and time even accross power cut lasting several days It is the base for automated wake up functions provided by the WakeUpScheduler The current time may represent a local time as well as an UTC time but no automatic time change will occur to account for daylight saving time In order to use the functions described here you should include lt script type text javascript src yocto_realtimeclock js gt lt script gt var yoctolib require yoctolib var YRealTimeClock yoctolib YRealTimeClock require_once yocto_realtimeclock php include yocto_realtimeclock h import yocto_realtimeclock h uses yocto_realtimeclock yocto_realtimeclock vb yocto_realtimeclock cs import com yoctopuce YoctoAPI YRealTimeClock from yocto_realtimeclock import Global functions yFindRealTimeClock func Retrieves a clock for a given ident
72. ction interface sssesssessssrsesrrsesrnettrnnsttrnntennstrannttnnantnaaacenanatnanenennnnea 121 eTA AUNICHON merae aaea aerea aieea S eo SE LAN aN AE EENE EEEN eae Sede 124 NOG tuncton INIGHACE aaiae araa eel An a EH A AANE Kee ANANA ANNAR ee ARAR ARNES 127 Voltage function interface oo eee ccecce eee eneeeeeeceaeenecaneneeaneceenaaeeeensaeeneneeeeneneaaes 130 Voltage Source function interface oo eee ee eeneceeeee cette aeeeeeeaeeeeteaeeeeteaeeeeteaeeeeseneaeeeeaaes 133 WakeUpMonitor function interface oo cece eeseeeeeeneeeeeeneeeeeesaeeeeeeaeeeseeeeerseeeeeseneeeeeeaeaes 135 WakeUpSchedule function interface o oo eeeeeeneeeeeeneeeeeeeeeeeeeeeeseeeeeeeeeeeteneeeeeeeaes 138 Watchdog function interface oo eeeceeeseceeeseeeeeeeeeeeeeneaeeneceaneneeaneceensneeeensaeenensneeneneaes 141 gt Wireless f neti n Interface nsession seese vevanhu Seeeiecceese eecbeededed decease cdhedeieeeteu rites tie 144 1 Introduction This manual is intended to be used as a reference for Yoctopuce Objective C library in order to interface your code with USB sensors and controllers The next chapter is taken from the free USB device Yocto Demo in order to provide a concrete examples of how the library is used within a program The remaining part of the manual is a function by function class by class documentation of the API The first section describes all general purpose global function while the forthcoming sections describe the vari
73. ctions described here you should include lt script type text javascript src yocto_humidity js gt lt script gt var yoctolib require yoctolib var YHumidity yoctolib YHumidity require_once yocto_humidity php cpp _ include yocto_humidity h import yocto_humidity h uses yocto_humidity yocto_humidity vb yocto_humidity cs import com yoctopuce YoctoAP Humidity from yocto_humidity import Global functions yFindHumidity func Retrieves a humidity sensor for a given identifier yFirstHumidity Starts the enumeration of humidity sensors currently accessible YHumidity methods humidity calibrateFromPoints rawValues refValues Configures error correction data points in particular to compensate for a possible perturbation of the measure caused by an enclosure humidity describe Returns a short text that describes unambiguously the instance of the humidity sensor in the form TYPE NAME SERIAL FUNCTIONID humidity get_advertisedValue Returns the current value of the humidity sensor no more than 6 characters humidity gt get_currentRawValue Returns the uncalibrated unrounded raw value returned by the sensor in RH as a floating point number humidity get_currentValue Returns the current value of the humidity in RH as a floating point number humidity get_errorMessage Returns the error message of the latest error with the humidity sensor
74. cy newval Changes the datalogger recording frequency for this function 3 Reference temperature set_logicalName newval Changes the logical name of the temperature sensor temperature set_lowestValue newval Changes the recorded minimal value observed temperature set_reportFrequency newval Changes the timed value notification frequency for this function temperature set_resolution newval Changes the resolution of the measured physical values temperature set_sensorType newval Modify the temperature sensor type temperature set_userData data Stores a user context provided as argument in the userData attribute of the function temperature wait_async callback context Waits for all pending asynchronous commands on the module to complete and invoke the user provided callback function 3 Reference 3 43 Tilt function interface The Yoctopuce application programming interface allows you to read an instant measure of the sensor as well as the minimal and maximal values observed In order to use the functions described here you should include lt script type text javascript src yocto_tilt js gt lt script gt var yoctolib require yoctolib var YTilt yoctolib YTilt require_once yocto_tilt php include yocto_tilt h import yocto_tilt h uses yocto_tilt yocto_tilt vb yocto_tilt cs import com yoctopuce YoctoAPI YTilt from yocto_tilt import Global functions yFi
75. d an instant measure of the sensor as well as the minimal and maximal values observed In order to use the functions described here you should include lt script type text javascript src yocto_lightsensor js gt lt script gt var yoctolib require yoctolib var YLightSensor yoctolib YLightSensor require_once yocto_lightsensor php include yocto_lightsensor h import yocto_lightsensor h uses yocto_lightsensor yocto_lightsensor vb yocto_lightsensor cs import com yoctopuce YoctoAPI YLightSensor from yocto_lightsensor import Global functions yFindLightSensor func Retrieves a light sensor for a given identifier yFirstLightSensor Starts the enumeration of light sensors currently accessible YLightSensor methods lightsensor calibrate calibratedVal Changes the sensor specific calibration parameter so that the current value matches a desired target linear scaling lightsensor calibrateFromPoints rawValues refValues Configures error correction data points in particular to compensate for a possible perturbation of the measure caused by an enclosure lightsensor describe Returns a short text that describes unambiguously the instance of the light sensor in the form TYPE NAME SERIAL FUNCTIONID lightsensor get_advertisedValue Returns the current value of the light sensor no more than 6 characters lightsensor get_currentRawValue Returns the uncalibrated unround
76. d as argument in the userData attribute of the function tilt gt wait_async callback context Waits for all pending asynchronous commands on the module to complete and invoke the user provided callback function 3 Reference 3 44 Voc function interface The Yoctopuce application programming interface allows you to read an instant measure of the sensor as well as the minimal and maximal values observed In order to use the functions described here you should include lt script type text javascript src yocto_voc js gt lt script gt var yoctolib require yoctolib var YVoc yoctolib YVoc require_once yocto_voc php include yocto_voc h import yocto_voc h uses yocto_voc yocto_voc vb yocto_voc cs import com yoctopuce YoctoAPI YVoc from yocto_voc import Global functions yFindVoc func Retrieves a Volatile Organic Compound sensor for a given identifier yFirstVoc Starts the enumeration of Volatile Organic Compound sensors currently accessible YVoc methods voc gt calibrateFromPoints rawValues refValues Configures error correction data points in particular to compensate for a possible perturbation of the measure caused by an enclosure voc describe Returns a short text that describes unambiguously the instance of the Volatile Organic Compound sensor in the form TYPE NAME SERIAL FUNCTIONID voc get_advertisedValue Returns the current
77. datalogger recording frequency for this function current set_logicalName newval Changes the logical name of the current sensor 3 Reference current set_lowestValue newval Changes the recorded minimal value observed current set_reportFrequency newval Changes the timed value notification frequency for this function current set_resolution newval Changes the resolution of the measured physical values current set_userData data Stores a user context provided as argument in the userData attribute of the function current wait_async callback context Waits for all pending asynchronous commands on the module to complete and invoke the user provided callback function 3 Reference 3 9 DataLogger function interface Yoctopuce sensors include a non volatile memory capable of storing ongoing measured data automatically without requiring a permanent connection to a computer The DataLogger function controls the global parameters of the internal data logger In order to use the functions described here you should include lt script type text javascript src yocto_datalogger js gt lt script gt var yoctolib require yoctolib var YDataLogger yoctolib YDataLogger require_once yocto_datalogger php include yocto_datalogger h import yocto_datalogger h uses yocto_datalogger yocto_datalogger vb yocto_datalogger cs import com yoctopuce YoctoAPI YDataLogger from yocto_datalogger imp
78. de of the latest error with the filesystem files gt get_filesCount Returns the number of files currently loaded in the filesystem files gt get_freeSpace Returns the free space for uploading new files to the filesystem in bytes files gt get_friendlyName Returns a global identifier of the filesystem in the format MODULE_NAME FUNCTION_NAME files get_functionDescriptor Returns a unique identifier of type YF UN_DESCR corresponding to the function files get_functionld 3 Reference Returns the hardware identifier of the filesystem without reference to the module files gt get_hardwareld Returns the unique hardware identifier of the filesystem in the form SERIAL FUNCTIONID files get_list pattern Returns a list of YFileRecord objects that describe files currently loaded in the filesystem files get_logicalName Returns the logical name of the filesystem files get_module Gets the YModule object for the device on which the function is located files get_module_async callback context Gets the YModule object for the device on which the function is located asynchronous version files get_userData Returns the value of the userData attribute as previously stored using method set_userData files isOnline Checks if the filesystem is currently reachable without raising any error files isOnline_async callback context Checks
79. dentifier of type YF UN_DESCR corresponding to the function temperature get_functionld Returns the hardware identifier of the temperature sensor without reference to the module temperature get_hardwareld Returns the unique hardware identifier of the temperature sensor in the form SERIAL FUNCTIONID 3 Reference temperature get_highestValue Returns the maximal value observed for the temperature since the device was started temperature get_logFrequency Returns the datalogger recording frequency for this function or OFF when measures are not stored in the data logger flash memory temperature get_logicalName Returns the logical name of the temperature sensor temperature get_lowestValue Returns the minimal value observed for the temperature since the device was started temperature get_module Gets the YModule object for the device on which the function is located temperature get_module_async callback context Gets the YModule object for the device on which the function is located asynchronous version temperature get_recordedData startTime endTime Retrieves a DataSet object holding historical data for this sensor for a specified time interval temperature get_reportFrequency Returns the timed value notification frequency or OFF if timed value notifications are disabled for this function temperature get_resolution Returns the resolution of the measur
80. e lt script type text javascript src yocto_datalogger js gt lt script gt var yoctolib require yoctolib var YDataLogger yoctolib YDataLogger require_once yocto_datalogger php cpp _ include yocto_datalogger h import yocto_datalogger h uses yocto_datalogger yocto_datalogger vb yocto_datalogger cs import com yoctopuce YoctoAP YDataLogger from yocto_datalogger import YDataRun methods datarun get_averageValue measureName pos Returns the average value of the measure observed at the specified time period datarun get_duration Returns the duration in seconds of the data run datarun get_maxValue measureName pos Returns the maximal value of the measure observed at the specified time period datarun get_measureNames Returns the names of the measures recorded by the data logger datarun get_minValue measureName pos Returns the minimal value of the measure observed at the specified time period datarun get_startTimeUTC Returns the start time of the data run relative to the Jan 1 1970 datarun get_valueCount Returns the number of values accessible in this run given the selected data samples interval datarun get_valuelnterval Returns the number of seconds covered by each value in this run datarun set_valuelnterval valuelnterval Changes the number of seconds covered by each value in this run 3 Reference datarun get_startTimeUTC YDataRun datarun star
81. e Returns a global identifier of the voltage sensor in the format MODULE_NAME FUNCTION_NAME pwminput get_functionDescriptor Returns a unique identifier of type YF UN_DESCR corresponding to the function 3 Reference pwminput get_functionld Returns the hardware identifier of the voltage sensor without reference to the module pwminput get_hardwareld Returns the unique hardware identifier of the voltage sensor in the form SERIAL FUNCTIONID pwminput get_highestValue Returns the maximal value observed for the voltage since the device was started pwminput get_logFrequency Returns the datalogger recording frequency for this function or OFF when measures are not stored in the data logger flash memory pwminput get_logicalName Returns the logical name of the voltage sensor pwminput get_lowestValue Returns the minimal value observed for the voltage since the device was started pwminput get_module Gets the YModule object for the device on which the function is located pwminput get_module_async callback context Gets the YModule object for the device on which the function is located asynchronous version pwminput get_period Returns the PWM period in milliseconds pwminput get_pulseCounter Returns the pulse counter value pwminput get_pulseDuration Returns the PWM pulse length in milliseconds as a floating point number pwminput g
82. e cs import com yoctopuce YoctoAPI YTemperature from yocto_temperature import Global functions yFindTemperature func Retrieves a temperature sensor for a given identifier yFirstTemperature Starts the enumeration of temperature sensors currently accessible YTemperature methods temperature calibrateFromPoints rawValues refValues Configures error correction data points in particular to compensate for a possible perturbation of the measure caused by an enclosure temperature describe Returns a short text that describes unambiguously the instance of the temperature sensor in the form TYPE NAME SERIAL FUNCTIONID temperature get_advertisedValue Returns the current value of the temperature sensor no more than 6 characters temperature get_currentRawValue Returns the uncalibrated unrounded raw value returned by the sensor in Celsius as a floating point number temperature get_currentValue Returns the current value of the temperature in Celsius as a floating point number temperature get_errorMessage Returns the error message of the latest error with the temperature sensor temperature get_errorType Returns the numerical error code of the latest error with the temperature sensor temperature get_friendlyName Returns a global identifier of the temperature sensor in the format MODULE_NAME FUNCTION_NAME temperature get_functionDescriptor Returns a unique i
83. e identifier of type YF UN_DESCR corresponding to the function wakeupschedule get_functionld Returns the hardware identifier of the wake up schedule without reference to the module wakeupschedule get_hardwareld Returns the unique hardware identifier of the wake up schedule in the form SERIAL FUNCTIONID wakeupschedule gt get_hours Returns the hours scheduled for wake up wakeupschedule get_logicalName Returns the logical name of the wake up schedule wakeupschedule get_minutes Returns all the minutes of each hour that are scheduled for wake up wakeupschedule get_minutesA 3 Reference Returns the minutes in the 00 29 interval of each hour scheduled for wake up wakeupschedule get_minutesB Returns the minutes in the 30 59 intervalof each hour scheduled for wake up wakeupschedule get_module Gets the YModule object for the device on which the function is located wakeupschedule get_module_async callback context Gets the YModule object for the device on which the function is located asynchronous version wakeupschedule get_monthDays Returns the days of the month scheduled for wake up wakeupschedule get_months Returns the months scheduled for wake up wakeupschedule get_nextOccurence Returns the date time seconds of the next wake up occurence wakeupschedule get_userData Returns the value of the userData attribute as previously stored using method set_userData w
84. e logical name of the digital IO port digitalio set_outputVoltage newval Changes the voltage source used to drive output bits digitalio set_portDirection newval Changes the IO direction of all bits of the port 0 makes a bit an input 1 makes it an output digitalio set_portOpenDrain newval Changes the electrical interface for each bit of the port digitalio set_portPolarity newval Changes the polarity of all the bits of the port 0 makes a bit an input 1 makes it an output digitalio set_portState newval Changes the digital IO port state bit O represents input 0 and so on digitalio set_userData data Stores a user context provided as argument in the userData attribute of the function digitalio toggle_bitState bitno Reverts a single bit of the I O port digitalio wait_async callback context Waits for all pending asynchronous commands on the module to complete and invoke the user provided callback function 3 Reference 3 14 Display function interface Yoctopuce display interface has been designed to easily show information and images The device provides built in multi layer rendering Layers can be drawn offline individually and freely moved on the display It can also replay recorded sequences animations In order to use the functions described here you should include lt script type text javascript src yocto_display js gt lt script gt var yoctolib require yoctolib var Y
85. e maximum time ms allowed for THEFUNCTIONSS to stay in state A before automatically switching back in to B state watchdog get_maxTimeOnStateB Retourne the maximum time ms allowed for THEFUNCTIONSS to stay in state B before automatically switching back in to A state watchdog get_module Gets the YModule object for the device on which the function is located watchdog get_module_async callback context Gets the YModule object for the device on which the function is located asynchronous version watchdog get_output Returns the output state of the watchdog when used as a simple switch single throw watchdog get_pulseTimer Returns the number of milliseconds remaining before the watchdog is returned to idle position state A during a measured pulse generation watchdog get_running Returns the watchdog running state watchdog gt get_state Returns the state of the watchdog A for the idle position B for the active position watchdog get_stateAtPowerOn Returns the state of the watchdog at device startup A for the idle position B for the active position UNCHANGED for no change watchdog get_triggerDelay Returns the waiting duration before a reset is automatically triggered by the watchdog in milliseconds watchdog get_triggerDuration Returns the duration of resets caused by the watchdog in milliseconds watchdog get_userData Returns the value of the userD
86. e of the monitor wakeupmonitor set_nextWakeUp newval Changes the days of the week when a wake up must take place wakeupmonitor set_powerDuration newval Changes the maximal wake up time Seconds before automatically going to sleep wakeupmonitor set_sleepCountdown newval Changes the delay before the next sleep period wakeupmonitor set_userData data Stores a user context provided as argument in the userData attribute of the function wakeupmonitor sleep secBeforeSleep Goes to sleep until the next wake up condition is met the RTC time must have been set before calling this function wakeupmonitor sleepFor secUntilWakeUp secBeforeSleep Goes to sleep for a specific duration or until the next wake up condition is met the RTC time must have been set before calling this function wakeupmonitor sleepUntil wakeUpTime secBeforeSleep Go to sleep until a specific date is reached or until the next wake up condition is met the RTC time must have been set before calling this function wakeupmonitor wait_async callback context 3 Reference Waits for all pending asynchronous commands on the module to complete and invoke the user provided callback function wakeupmonitor gt wakeUp Forces a wake up 3 Reference 3 48 WakeUpSchedule function interface The WakeUpSchedule function implements a wake up condition The wake up time is specified as a set of months and or days and or hours and or minute
87. e of the userData attribute as previously stored using method set_userData hubport isOnline Checks if the Yocto hub port is currently reachable without raising any error hubport isOnline_async callback context Checks if the Yocto hub port is currently reachable without raising any error asynchronous version hubport load msValidity Preloads the Yocto hub port cache with a specified validity duration hubport load_async msValidity callback context Preloads the Yocto hub port cache with a specified validity duration asynchronous version hubport nextHubPort Continues the enumeration of Yocto hub ports started using yFirstHubPort hubport registerValueCallback callback Registers the callback function that is invoked on every change of advertised value hubport set_enabled newval Changes the activation of the Yocto hub port hubport set_logicalName newval Changes the logical name of the Yocto hub port hubport set_userData data Stores a user context provided as argument in the userData attribute of the function hubport wait_async callback context Waits for all pending asynchronous commands on the module to complete and invoke the user provided callback function 3 Reference 3 21 Humidity function interface The Yoctopuce application programming interface allows you to read an instant measure of the sensor as well as the minimal and maximal values observed In order to use the fun
88. e voltage source pwmpowersource get_errorType Returns the numerical error code of the latest error with the voltage source pwmpowersource get_friendlyName Returns a global identifier of the voltage source in the format MODULE_NAME FUNCTION_NAME pwmpowersource gt get_functionDescriptor Returns a unique identifier of type YF UN_DESCR corresponding to the function pwmpowersource gt get_functionld Returns the hardware identifier of the voltage source without reference to the module pwmpowersource gt get_hardwareld Returns the unique hardware identifier of the voltage source in the form SERIAL FUNCTIONID pwmpowersource gt get_logicalName Returns the logical name of the voltage source pwmpowersource get_module Gets the YModule object for the device on which the function is located pwmpowersource get_module_async callback context Gets the YModule object for the device on which the function is located asynchronous version 3 Reference pwmpowersource get_powerMode Returns the selected power source for the PWM on the same device pwmpowersource gt get_userData Returns the value of the userData attribute as previously stored using method set_userData pwmpowersource isOnline Checks if the voltage source is currently reachable without raising any error pwmpowersource gt isOnline_async callback context Checks if the voltage source is currently reachable without raising
89. ed isOnline if on_off isEqualToString on led set power Y POWER ON else led set power Y POWER OFF else NSLog Module not connected check identification and USB cable n return 0 There are only a few really important lines in this example We will look at them in details yocto_api h et yocto_led h These two import files provide access to the functions allowing you to manage Yoctopuce modules yocto_api h must always be used yocto_led h is necessary to manage modules containing a led such as Yocto Demo YAPI RegisterHub The YAPI RegisterHub function initializes the Yoctopuce API and indicates where the modules should be looked for When used with the parameter usb it will use the modules locally connected to the computer running the library If the initialization does not succeed this function returns a value different from YAPI SUCCESS and errmsg contains the error message Led FindLed The Led FindLed function allows you to find a led from the serial number of the module on which it resides and from its function name You can use logical names as well as long as you have initialized them Let us imagine a Yocto Demo module with serial number YCTOPOC 1 123456 which you have named MyModule and for which you have given the ed function the name MyFunction The following five calls are strictly equivalent as long as MyFunction is defined only once YLed led Led Findh
90. ed raw value returned by the sensor in lux as a floating point number lightsensor get_currentValue Returns the current value of the ambient light in lux as a floating point number lightsensor get_errorMessage Returns the error message of the latest error with the light sensor lightsensor get_errorType Returns the numerical error code of the latest error with the light sensor lightsensor get_friendlyName Returns a global identifier of the light sensor in the format MODULE_NAME FUNCTION_NAME lightsensor get_functionDescriptor Returns a unique identifier of type YF UN_DESCR corresponding to the function lightsensor get_functionld 3 Reference Returns the hardware identifier of the light sensor without reference to the module lightsensor get_hardwareld Returns the unique hardware identifier of the light sensor in the form SERIAL FUNCTIONID lightsensor get_highestValue Returns the maximal value observed for the ambient light since the device was started lightsensor get_logFrequency Returns the datalogger recording frequency for this function or OFF when measures are not stored in the data logger flash memory lightsensor get_logicalName Returns the logical name of the light sensor lightsensor get_lowestValue Returns the minimal value observed for the ambient light since the device was started lightsensor get_measureType Returns the type of light measure
91. ed values temperature get_sensorType Returns the temperature sensor type temperature get_unit Returns the measuring unit for the temperature temperature get_userData Returns the value of the userData attribute as previously stored using method set_userData temperature isOnline Checks if the temperature sensor is currently reachable without raising any error temperature isOnline_async callback context Checks if the temperature sensor is currently reachable without raising any error asynchronous version temperature load msValidity Preloads the temperature sensor cache with a specified validity duration temperature loadCalibrationPoints rawValues refValues Retrieves error correction data points previously entered using the method calibrateFromPoints temperature load_async msValidity callback context Preloads the temperature sensor cache with a specified validity duration asynchronous version temperature nextTemperature Continues the enumeration of temperature sensors started using yFirstTemperature temperature registerTimedReportCallback callback Registers the callback function that is invoked on every periodic timed notification temperature registerValueCallback callback Registers the callback function that is invoked on every change of advertised value temperature set_highestValue newval Changes the recorded maximal value observed temperature set_logFrequen
92. ermine where the problem happened and view the explanatory message linked to the exception e Otherwise the exception makes your program crash bang As this latest situation is not the most desirable the Yoctopuce library offers another possibility for error handling allowing you to create a robust program without needing to catch exceptions at every line of code You simply need to call the yDisableExceptions function to commute the library to a mode where exceptions for all the functions are systematically replaced by specific return values which can be tested by the caller when necessary For each function the name of each return value in case of error is systematically documented in the library reference The name always follows the same logic a get _state method returns a Y STATE INVALID value a get_currentValue method returns a Y CURRENTVALUE INVALID value and so on In any case the returned value is of the expected type and is not a null pointer which would risk crashing your program At worst if you display the value without testing it it will be outside the expected bounds for the returned value In the case of functions which do not normally return information the return value is YAPI SUCCESS if everything went well and a different error code in case of failure When you work without exceptions you can obtain an error code and an error message explaining the source of the error You
93. error altitude isOnline_async callback context Checks if the altimeter is currently reachable without raising any error asynchronous version altitude load msValidity Preloads the altimeter cache with a specified validity duration altitude loadCalibrationPoints rawValues refValues Retrieves error correction data points previously entered using the method calibrateFromPoints altitude load_async msValidity callback context Preloads the altimeter cache with a specified validity duration asynchronous version altitude nextAltitude Continues the enumeration of altimeters started using yF irstAltitude altitude registerTimedReportCallback callback Registers the callback function that is invoked on every periodic timed notification altitude registerValueCallback callback Registers the callback function that is invoked on every change of advertised value altitude set_currentValue newval Changes the current estimated altitude altitude set_highestValue newval Changes the recorded maximal value observed 3 Reference altitude set_logFrequency newval Changes the datalogger recording frequency for this function altitude set_logicalName newval Changes the logical name of the altimeter altitude set_lowestValue newval Changes the recorded minimal value observed altitude set_qnh newval Changes the barometric pressure adjusted to sea level used to compute the altitude QNH alti
94. ervo get_module Gets the YModule object for the device on which the function is located servo get_module_async callback context Gets the YModule object for the device on which the function is located asynchronous version servo get_neutral Returns the duration in microseconds of a neutral pulse for the servo servo get_position Returns the current servo position servo get_positionAtPowerOn Returns the servo position at device power up servo get_range Returns the current range of use of the servo servo get_userData Returns the value of the userData attribute as previously stored using method set_userData servo isOnline Checks if the servo is currently reachable without raising any error servo isOnline_async callback context Checks if the servo is currently reachable without raising any error asynchronous version servo load msValidity Preloads the servo cache with a specified validity duration servo load_async msValidity callback context Preloads the servo cache with a specified validity duration asynchronous version servo move target ms_duration Performs a smooth move at constant speed toward a given position servo nextServo Continues the enumeration of servos started using yFirstServo servo registerValueCallback callback Registers the callback function that is invoked on every change of advertised value servo set_enabled newval Stops or
95. esolution newval Changes the resolution of the measured physical values gyro set_userData data Stores a user context provided as argument in the userData attribute of the function gyro wait_async callback context Waits for all pending asynchronous commands on the module to complete and invoke the user provided callback function 3 Reference 3 20 Yocto hub port interface YHubPort objects provide control over the power supply for every YoctoHub port and provide information about the device connected to it The logical name of a YHubPort is always automatically set to the unique serial number of the Yoctopuce device connected to it In order to use the functions described here you should include lt script type text javascript src yocto_hubport js gt lt script gt var yoctolib require yoctolib var YHubPort yoctolib YHubPort require_once yocto_hubport php include yocto_hubport h import yocto_hubport h uses yocto_hubport yocto_hubport vb yocto_hubport cs import com yoctopuce YoctoAP YHubPort from yocto_hubport import Global functions yFindHubPort func Retrieves a Yocto hub port for a given identifier yFirstHubPort Starts the enumeration of Yocto hub ports currently accessible YHubPort methods hubport describe Returns a short text that describes unambiguously the instance of the Yocto hub port in the form TYPE NAME SERIAL FUNCTIONID
96. ess joinNetwork ssid securityKey Changes the configuration of the wireless lan interface to connect to an existing access point infrastructure mode wireless load msValidity Preloads the wireless lan interface cache with a specified validity duration wireless load_async msValidity callback context Preloads the wireless lan interface cache with a specified validity duration asynchronous version wireless nextWireless Continues the enumeration of wireless lan interfaces started using yFirstWireless wireless registerValueCallback callback Registers the callback function that is invoked on every change of advertised value wireless set_logicalName newval Changes the logical name of the wireless lan interface wireless set_userData data Stores a user context provided as argument in the userData attribute of the function wireless softAPNetwork ssid securityKey Changes the configuration of the wireless lan interface to create a new wireless network by emulating a WiFi access point Soft AP wireless wait_async callback context Waits for all pending asynchronous commands on the module to complete and invoke the user provided callback function 3 Reference Index A Accelerometer 13 Altitude 16 AnButton 19 Blueprint 10 C CarbonDioxide 22 Clock 103 ColorLed 25 Compass 27 Configuration 105 Current 30 D Data 36 38 40 DataLogger 33 Digital 42 Display 45 DisplayLayer 48
97. et_pulseTimer Returns the timer of the pulses counter ms pwminput get_pwmReportMode Returns the parameter frequency duty cycle pulse width edges count returned by the get_currentValue function and callbacks pwminput get_recordedData startTime endTime Retrieves a DataSet object holding historical data for this sensor for a specified time interval pwminput get_reportFrequency Returns the timed value notification frequency or OFF if timed value notifications are disabled for this function pwminput get_resolution Returns the resolution of the measured values pwminput get_unit Returns the measuring unit for the values returned by get_currentValue and callbacks pwminput get_userData Returns the value of the userData attribute as previously stored using method set_userData pwminput isOnline Checks if the voltage sensor is currently reachable without raising any error pwminput isOnline_async callback context Checks if the voltage sensor is currently reachable without raising any error asynchronous version pwminput load msValidity Preloads the voltage sensor cache with a specified validity duration pwminput loadCalibrationPoints rawValues refValues 3 Reference Retrieves error correction data points previously entered using the method calibrateFromPoints pwminput load_async msValidity callback context Preloads the voltage sensor cache with a specified va
98. eturns the value of the userData attribute as previously stored using method set_userData display isOnline Checks if the display is currently reachable without raising any error display isOnline_async callback context Checks if the display is currently reachable without raising any error asynchronous version display load msvValidity Preloads the display cache with a specified validity duration display load_async msValidity callback context Preloads the display cache with a specified validity duration asynchronous version display newSequence Starts to record all display commands into a sequence for later replay display nextDisplay Continues the enumeration of displays started using yFirstDisplay display pauseSequence delay_ms Waits for a specified delay in milliseconds before playing next commands in current sequence display playSequence sequenceName Replays a display sequence previously recorded using newSequence and saveSequence display registerValueCallback callback 3 Reference Registers the callback function that is invoked on every change of advertised value display resetAll Clears the display screen and resets all display layers to their default state displaysaveSequence sequenceName Stops recording display commands and saves the sequence into the specified file on the display internal memory display set_brightness newval Changes the brightness of t
99. ext Preloads the data logger cache with a specified validity duration asynchronous version datalogger nextDataLogger Continues the enumeration of data loggers started using yFirstDataLogger datalogger registerValueCallback callback Registers the callback function that is invoked on every change of advertised value datalogger set_autoStart newval Changes the default activation state of the data logger on power up datalogger set_beaconDriven newval Changes the type of synchronisation of the data logger datalogger set_logicalName newval Changes the logical name of the data logger datalogger set_recording newval Changes the activation state of the data logger to start stop recording data datalogger set_timeUTC newval Changes the current UTC time reference used for recorded data datalogger set_userData data Stores a user context provided as argument in the userData attribute of the function datalogger wait_async callback context 3 Reference Waits for all pending asynchronous commands on the module to complete and invoke the user provided callback function 3 Reference 3 10 Formatted data sequence A run is a continuous interval of time during which a module was powered on A data run provides easy access to all data collected during a given run providing on the fly resampling at the desired reporting rate In order to use the functions described here you should includ
100. f timed value notifications are disabled for this function current get_resolution Returns the resolution of the measured values current get_unit Returns the measuring unit for the current current get_userData Returns the value of the userData attribute as previously stored using method set_userData current isOnline Checks if the current sensor is currently reachable without raising any error current isOnline_async callback context Checks if the current sensor is currently reachable without raising any error asynchronous version current load msValidity Preloads the current sensor cache with a specified validity duration current loadCalibrationPoints rawValues refValues Retrieves error correction data points previously entered using the method calibrateFromPoints current load_async msValidity callback context Preloads the current sensor cache with a specified validity duration asynchronous version current nextCurrent Continues the enumeration of current sensors started using yFirstCurrent current registerTimedReportCallback callback Registers the callback function that is invoked on every periodic timed notification current registerValueCallback callback Registers the callback function that is invoked on every change of advertised value current set_highestValue newval Changes the recorded maximal value observed current set_logFrequency newval Changes the
101. fallbacklpAddr fallbackSubnetMaskLen fallbackRouter Changes the configuration of the network interface to enable the use of an IP address received from a DHCP server network useStaticIP ipAddress subnetMaskLen router Changes the configuration of the network interface to use a static IP address network wait_async callback context 3 Reference Waits for all pending asynchronous commands on the module to complete and invoke the user provided callback function 3 Reference 3 29 OS control The OScontrol object allows some control over the operating system running a VirtualHub OsControl is available on the VirtualHub software only This feature must be activated at the VirtualHub start up with o option In order to use the functions described here you should include lt script type text javascript src yocto_oscontrol js gt lt script gt var yoctolib require yoctolib var YOsControl yoctolib YOsControl require_once yocto_oscontrol php include yocto_oscontrol h import yocto_oscontrol h uses yocto_oscontrol yocto_oscontrol vb yocto_oscontrol cs import com yoctopuce YoctoAP YOsControl from yocto_oscontrol import Global functions yFindOsControl func Retrieves OS control for a given identifier yFirstOsControl Starts the enumeration of OS control currently accessible YOsCont rol methods oscontrol describe Returns a short text that describes unambiguously
102. function 3 Reference 3 25 Measured value YMeasure objects are used within the API to represent a value measured at a specified time These objects are used in particular in conjunction with the YDataSet class In order to use the functions described here you should include lt script type text javascript src yocto_api js gt lt script gt var yoctolib require yoctolib var YAPI yoctolib YAPI var YModule yoctolib YModule require_once yocto_api php include yocto_api h import yocto_api h uses yocto_api yocto_api vb yocto_api cs import com yoctopuce YoctoAPI YModule from yocto_api import YMeasure methods measure get_averageValue Returns the average value observed during the time interval covered by this measure measure get_endTimeUTC Returns the end time of the measure relative to the Jan 1 1970 UTC Unix timestamp measure get_maxValue Returns the largest value observed during the time interval covered by this measure measure get_minValue Returns the smallest value observed during the time interval covered by this measure measure get_startTimeUTC Returns the start time of the measure relative to the Jan 1 1970 UTC Unix timestamp 3 Reference 3 26 Module control interface This interface is identical for all Yoctopuce USB modules It can be used to control the module global parameters and to enumerate the functions provided by each module
103. he acceleration as a floating point number accelerometer get_zValue Returns the Z component of the acceleration as a floating point number accelerometer isOnline Checks if the accelerometer is currently reachable without raising any error accelerometer isOnline_async callback context Checks if the accelerometer is currently reachable without raising any error asynchronous version accelerometer load msValidity Preloads the accelerometer cache with a specified validity duration accelerometer loadCalibrationPoints rawValues refValues Retrieves error correction data points previously entered using the method calibrateFromPoints accelerometer load_async msValidity callback context Preloads the accelerometer cache with a specified validity duration asynchronous version accelerometer nextAccelerometer Continues the enumeration of accelerometers started using yFirstAccelerometer accelerometer registerTimedReportCallback callback Registers the callback function that is invoked on every periodic timed notification accelerometer registerValueCallback callback Registers the callback function that is invoked on every change of advertised value 3 Reference accelerometer set_highestValue newval Changes the recorded maximal value observed accelerometer set_logFrequency newval Changes the datalogger recording frequency for this function accelerometer set_logicalName newval
104. he display display set_enabled newval Changes the power state of the display display set_logicalName newval Changes the logical name of the display display set_orientation newval Changes the display orientation display set_startupSeq newval Changes the name of the sequence to play when the displayed is powered on display set_userData data Stores a user context provided as argument in the userData attribute of the function display stopSequence Stops immediately any ongoing sequence replay display swapLayerContent layerldA layerldB Swaps the whole content of two layers display upload pathname content Uploads an arbitrary file for instance a GIF file to the display to the specified full path name display wait_async callback context Waits for all pending asynchronous commands on the module to complete and invoke the user provided callback function 3 Reference 3 15 DisplayLayer object interface A DisplayLayer is an image layer containing objects to display bitmaps text etc The content is displayed only when the layer is active on the screen and not masked by other overlapping layers In order to use the functions described here you should include lt script type text javascript src yocto_display js gt lt script gt var yoctolib require yoctolib var YDisplay yoctolib Y Display require_once yocto_display php cpp _ include yocto_display h impor
105. hub discovery if a callback as been registered with yRegisterDeviceRemovalCallback it will be called for each net work hub that will respond to the discovery yUnregisterHub url Setup the Yoctopuce library to no more use modules connected on a previously registered machine with RegisterHub yUpdateDeviceList errmsg Triggers a re detection of connected Yoctopuce modules yUpdateDeviceList_async callback context Triggers a re detection of connected Yoctopuce modules 3 Reference 3 2 Accelerometer function interface The Yoctopuce application programming interface allows you to read an instant measure of the sensor as well as the minimal and maximal values observed In order to use the functions described here you should include lt script type text javascript src yocto_accelerometer js gt lt script gt var yoctolib require yoctolib var YAccelerometer yoctolib YAccelerometer require_once yocto_accelerometer php include yocto_accelerometer h import yocto_accelerometer h uses yocto_accelerometer yocto_accelerometer vb yocto_accelerometer cs import com yoctopuce YoctoAPI Accelerometer from yocto_accelerometer import Global functions yFindAccelerometer func Retrieves an accelerometer for a given identifier yFirstAccelerometer Starts the enumeration of accelerometers currently accessible YAccelerometer methods accelerometer calibrateFromPoints rawValues refValues
106. ial port serialport get_module Gets the YModule object for the device on which the function is located serialport get_module_async callback context Gets the YModule object for the device on which the function is located asynchronous version serialport gt get_msgCount Returns the total number of messages received since last reset serialport get_protocol Returns the type of protocol used over the serial line as a string serialport get_rxCount Returns the total number of bytes received since last reset serialport get_serialMode Returns the serial port communication parameters as a string such as 9600 8N1 serialport get_txCount Returns the total number of bytes transmitted since last reset serialport get_userData Returns the value of the userData attribute as previously stored using method set_userData serialport isOnline Checks if the serial port is currently reachable without raising any error serialport isOnline_async callback context Checks if the serial port is currently reachable without raising any error asynchronous version serialport load msValidity Preloads the serial port cache with a specified validity duration serialport load_async msValidity callback context Preloads the serial port cache with a specified validity duration asynchronous version serialport gt modbusReadBits slaveNo pduAddr nBits Reads one or more contiguous internal bi
107. ib require yoctolib var YGenericSensor yoctolib YGenericSensor require_once yocto_genericsensor php cpp _ include yocto_genericsensor h import yocto_genericsensor h uses yocto_genericsensor v _ yocto_genericsensor vb cs _ yocto_genericsensor cs import com yoctopuce YoctoAP YGenericSensor from yocto_genericsensor import Global functions yFindGenericSensor func Retrieves a generic sensor for a given identifier yFirstGenericSensor Starts the enumeration of generic sensors currently accessible YGenericSensor methods genericsensor gt calibrateFromPoints rawValues refValues Configures error correction data points in particular to compensate for a possible perturbation of the measure caused by an enclosure genericsensor describe Returns a short text that describes unambiguously the instance of the generic sensor in the form TYPE NAME SERIAL FUNCTIONID genericsensor get_advertisedValue Returns the current value of the generic sensor no more than 6 characters genericsensor get_currentRawValue Returns the uncalibrated unrounded raw value returned by the sensor genericsensor get_currentValue Returns the current measured value genericsensor get_errorMessage Returns the error message of the latest error with the generic sensor genericsensor get_errorType Returns the numerical error code of the latest error with the generic sensor gener
108. icsensor get_friendlyName Returns a global identifier of the generic sensor in the format MODULE_NAME FUNCTION_NAME genericsensor get_functionDescriptor Returns a unique identifier of type YF UN_DESCR corresponding to the function genericsensor get_functionld Returns the hardware identifier of the generic sensor without reference to the module genericsensor get_hardwareld Returns the unique hardware identifier of the generic sensor in the form SERIAL FUNCTIONID 3 Reference genericsensor get_highestValue Returns the maximal value observed for the measure since the device was started genericsensor get_logFrequency Returns the datalogger recording frequency for this function or OFF when measures are not stored in the data logger flash memory genericsensor get_logicalName Returns the logical name of the generic sensor genericsensor get_lowestValue Returns the minimal value observed for the measure since the device was started genericsensor get_module Gets the YModule object for the device on which the function is located genericsensor get_module_async callback context Gets the YModule object for the device on which the function is located asynchronous version genericsensor get_recordedData startTime endTime Retrieves a DataSet object holding historical data for this sensor for a specified time interval genericsensor get_reportFrequency Returns the timed
109. ieves a motor for a given identifier yFirstMotor Starts the enumeration of motors currently accessible YMot or methods motor brakingForceMove targetPower delay Changes progressively the braking force applied to the motor for a specific duration motor describe Returns a short text that describes unambiguously the instance of the motor in the form TYPE NAME SERIAL FUNCTIONID motor drivingForceMove targetPower delay Changes progressively the power sent to the moteur for a specific duration motor get_advertisedValue Returns the current value of the motor no more than 6 characters motor get_brakingForce Returns the braking force applied to the motor as a percentage motor get_cutOffVoltage Returns the threshold voltage under which the controller automatically switches to error state and prevents further current draw motor get_drivingForce Returns the power sent to the motor as a percentage between 100 and 100 motor get_errorMessage Returns the error message of the latest error with the motor motor get_errorType Returns the numerical error code of the latest error with the motor motor get_failSafeTimeout Returns the delay in milliseconds allowed for the controller to run autonomously without receiving any instruction from the control process 3 Reference motor get_frequency Returns the PWM frequency used to control the motor mot
110. ifier yFirstRealTimeClock Starts the enumeration of clocks currently accessible YRealTimeClock methods realtimeclock describe Returns a short text that describes unambiguously the instance of the clock in the form TYPE NAME SERIAL FUNCTIONID realtimeclock get_advertisedValue Returns the current value of the clock no more than 6 characters realtimeclock get_dateTime Returns the current time in the form YYYY MM DD hh mm ss realtimeclock get_errorMessage Returns the error message of the latest error with the clock realtimeclock get_errorType Returns the numerical error code of the latest error with the clock realtimeclock get_friendlyName Returns a global identifier of the clock in the format MODULE_NAME FUNCTION_NAME realtimeclock get_functionDescriptor Returns a unique identifier of type YF UN_DESCR corresponding to the function realtimeclock get_functionld Returns the hardware identifier of the clock without reference to the module realtimeclock get_hardwareld Returns the unique hardware identifier of the clock in the form SERIAL FUNCTIONID realtimeclock get_logicalName Returns the logical name of the clock realtimeclock get_module 3 Reference Gets the YModule object for the device on which the function is located realtimeclock get_module_async callback context Gets the YModule object for the device on which
111. iii ih asain Sein at ean AEA EAN aa EEE 73 3 26 Module Control interface oo a r a r e a a oa attene dai 74 a Motor funetionsintertace 2 22 222eecsees6 kc a Ee beck bhi Be adesaadeve cast ch ca Ue i ces 77 Network fUNCtION Merate tann a aa E Na aaaea OE OONAN aaaea 80 OS CONTON votes es a aa ot he A AE T A E E sha saee 84 Power TUNCOM INIGM ACE srianan nee a e a aaae eaa bette dese 86 Pressure function interface eesaaaaaennnnnnnunnnnensenenrirrrrrrrrrrerrnnsrrrrrrrrrrrrenssnnrrrrnnrerreeennenennn 89 Pwminput function interface esesssseessssrssrrresrrrnsrrnnarrnnsntrnntstrntttanrtttnettnnacenanatrannnennnnnenne 92 Pum uneia Menace meea eater eles cs Ai eens ee 95 PwmPowerSource function interface ooo eee cecessesesssccccceeceeeeeseesaeeeececeeeceeeeesssaaaeseeeeees 98 CQUALERMIOMIMEM ACE saiae nnana a Anaa Eh anaa RAAS iaa EnA AAAA NE nana iaiT 100 Real Time Clock function interface ooo eee ee ccc cccccccccececeeeeseseseeeeeeceeeeeceeeeessseessececeeeeeeeeeeeess 103 Reference frame configuration ssessssesssrsesrrersrnreetrnnesrnnsttrntrrennnttnnatenanntnnnanenanatnnannena 105 Relay Tunetioniinteriace ee a T a a r a eA a ARE a T eae aS dh aa T EAEAN Ea 108 SENSOF function merate aeo oer lle OA AEE RA a Aa a aeaaee 111 SerialPort function internate serere ear EES EEE SEEE EA Gees sik ieee 114 SErVOTUNCHION MEITE alairar Arkana EEEREN NENEN NANE EEEn EAEE ELERTE Bee ie 118 Temperature fun
112. include yocto_digitalio h import yocto_digitalio h uses yocto_digitalio yocto_digitalio vb yocto_digitalio cs import com yoctopuce YoctoAPI YDigitallO from yocto_digitalio import Global functions yFindDigitallO func Retrieves a digital IO port for a given identifier yFirstDigitallO Starts the enumeration of digital IO ports currently accessible YDigitalIo methods digitaliodelayedPulse bitno ms_delay ms_duration Schedules a pulse on a single bit for a specified duration digitalio describe Returns a short text that describes unambiguously the instance of the digital IO port in the form TYPE NAME SERTIAL FUNCTIONID digitalioget_advertisedValue Returns the current value of the digital IO port no more than 6 characters digitalio get_bitDirection bitno Returns the direction of a single bit from the I O port 0 means the bit is an input 1 an output digitalio gt get_bitOpenDrain bitno Returns the type of electrical interface of a single bit from the I O port digitalio get_bitPolarity bitno Returns the polarity of a single bit from the I O port 0 means the I O works in regular mode 1 means the I O works in reverse mode digitalio get_bitState bitno Returns the state of a single bit of the I O port digitalioget_errorMessage Returns the error message of the latest error with the digital lO port digitalio get_errorType Returns the numerical error code of
113. ipt type text javascript src yocto_current js gt lt script gt var yoctolib require yoctolib var YCurrent yoctolib YCurrent require_once yocto_current php include yocto_current h import yocto_current h uses yocto_current yocto_current vb yocto_current cs import com yoctopuce YoctoAPI YCurrent from yocto_current import Global functions yFindCurrent func Retrieves a current sensor for a given identifier yFirstCurrent Starts the enumeration of current sensors currently accessible YCurrent methods current calibrateFromPoints rawValues refValues Configures error correction data points in particular to compensate for a possible perturbation of the measure caused by an enclosure current describe Returns a short text that describes unambiguously the instance of the current sensor in the form TYPE NAME SERIAL FUNCTIONID current get_advertisedValue Returns the current value of the current sensor no more than 6 characters current get_currentRawValue Returns the uncalibrated unrounded raw value returned by the sensor in mA as a floating point number current get_currentValue Returns the current value of the current in mA as a floating point number current get_errorMessage Returns the error message of the latest error with the current sensor current get_errorType Returns the numerical error code of the latest error with the cur
114. ization beacon module get_errorMessage Returns the error message of the latest error with this module object module get_errorType Returns the numerical error code of the latest error with this module object module get_firmwareRelease 3 Reference Returns the version of the firmware embedded in the module module get_hardwareld Returns the unique hardware identifier of the module module get_icon2d Returns the icon of the module module get_lastLogs Returns a string with last logs of the module module get_logicalName Returns the logical name of the module module get_luminosity Returns the luminosity of the module informative leds from 0 to 100 module get_persistentSettings Returns the current state of persistent module settings module get_productld Returns the USB device identifier of the module module get_productName Returns the commercial name of the module as set by the factory module get_productRelease Returns the hardware release version of the module module get_rebootCountdown Returns the remaining number of seconds before the module restarts or zero when no reboot has been scheduled module gt get_serialNumber Returns the serial number of the module as set by the factory module get_upTime Returns the number of milliseconds spent since the module was powered on module get_usbCurrent Returns the current consumed by the module
115. last energy counter reset in seconds power get_module Gets the YModule object for the device on which the function is located power get_module_async callback context Gets the YModule object for the device on which the function is located asynchronous version power get_recordedData startTime endTime Retrieves a DataSet object holding historical data for this sensor for a specified time interval power get_reportFrequency Returns the timed value notification frequency or OFF if timed value notifications are disabled for this function power get_resolution Returns the resolution of the measured values power gt get_unit Returns the measuring unit for the electrical power power get_userData Returns the value of the userData attribute as previously stored using method set_userData power isOnline Checks if the electrical power sensor is currently reachable without raising any error power isOnline_async callback context Checks if the electrical power sensor is currently reachable without raising any error asynchronous version power load msValidity Preloads the electrical power sensor cache with a specified validity duration power loadCalibrationPoints rawValues refValues Retrieves error correction data points previously entered using the method calibrateFromPoints power load_async msValidity callback context Preloads the electrical power sensor cache
116. lback context Loads the the next block of measures from the dataLogger asynchronously 3 Reference 3 12 Unformatted data sequence YDataStream objects represent bare recorded measure sequences exactly as found within the data logger present on Yoctopuce sensors In most cases it is not necessary to use YDataStream objects directly as the YDataSet objects returned by the get_recordedData method from sensors and the get_dataSets method from the data logger provide a more convenient interface In order to use the functions described here you should include lt script type text javascript src yocto_api js gt lt script gt var yoctolib require yoctolib var YAPI yoctolib YAPI var YModule yoctolib YModule require_once yocto_api php include yocto_api h import yocto_api h uses yocto_api yocto_api vb yocto_api cs import com yoctopuce YoctoAPI YModule from yocto_api import YDataStream methods datastream get_averageValue Returns the average of all measures observed within this stream datastream get_columnCount Returns the number of data columns present in this stream datastream get_columnNames Returns the title or meaning of each data column present in this stream datastream get_data row col Returns a single measure from the data stream specified by its row and column index datastream get_dataRows Returns the whole data set contained in the strea
117. lidity duration asynchronous version pwminput nextPwminput Continues the enumeration of voltage sensors started using yF irstPwmInput pwminput registerTimedReportCallback callback Registers the callback function that is invoked on every periodic timed notification pwminput registerValueCallback callback Registers the callback function that is invoked on every change of advertised value pwminput resetCounter Returns the pulse counter value as well as his timer pwminput set_highestValue newval Changes the recorded maximal value observed pwminput set_logFrequency newval Changes the datalogger recording frequency for this function pwminput set_logicalName newval Changes the logical name of the voltage sensor pwminput set_lowestValue newval Changes the recorded minimal value observed pwminput set_pwmReportMode newval Modify the parameter type frequency duty cycle pulse width ou edge count returned by the get_currentValue function and callbacks pwminput set_reportFrequency newval Changes the timed value notification frequency for this function pwminput set_resolution newval Changes the resolution of the measured physical values pwminput set_userData data Stores a user context provided as argument in the userData attribute of the function pwminput wait_async callback context Waits for all pending asynchronous commands on the module to complete and invoke the user provided ca
118. llback function 3 Reference 3 33 Pwm function interface The Yoctopuce application programming interface allows you to configure start and stop the PWM In order to use the functions described here you should include lt script type text javascript src yocto_pwmoutput js gt lt script gt var yoctolib require yoctolib var YPwmOutput yoctolib YPwmOutput require_once yocto_pwmoutput php include yocto_pwmoutput h import yocto_pwmoutput h uses yocto_pwmoutput yocto_pwmoutput vb yocto_pwmoutput cs import com yoctopuce YoctoAPI YPwmOutput from yocto_pwmoutput import Global functions yFindPwmOutput func Retrieves a PWM for a given identifier yFirstPwmOutput Starts the enumeration of PWMs currently accessible YPwmOutput methods pwmoutput describe Returns a short text that describes unambiguously the instance of the PWM in the form TYPE NAME SERIAL FUNCTIONID pwmoutput dutyCycleMove target ms_duration Performs a smooth change of the pulse duration toward a given value pwmoutput get_advertisedValue Returns the current value of the PWM no more than 6 characters pwmoutput get_dutyCycle Returns the PWM duty cycle in per cents pwmoutput get_dutyCycleAtPowerOn Returns the PWMs duty cycle at device power on as a floating point number between 0 and 100 pwmoutput get_enabled Returns the state of the PWMs pwmoutput get_enabledAtPowerOn Returns
119. lobal functions yFindWakeUpMonitor func Retrieves a monitor for a given identifier yFirstWakeUpMonitor Starts the enumeration of monitors currently accessible YWakeUpMonitor methods wakeupmonitor describe Returns a short text that describes unambiguously the instance of the monitor in the form TYPE NAME SERIAL FUNCTIONID wakeupmonitor get_advertisedValue Returns the current value of the monitor no more than 6 characters wakeupmonitor get_errorMessage Returns the error message of the latest error with the monitor wakeupmonitor get_errorType Returns the numerical error code of the latest error with the monitor wakeupmonitor get_friendlyName Returns a global identifier of the monitor in the format MODULE_NAME FUNCTION_NAME wakeupmonitor get_functionDescriptor Returns a unique identifier of type YF UN_DESCR corresponding to the function wakeupmonitor get_functionld Returns the hardware identifier of the monitor without reference to the module wakeupmonitor get_hardwareld Returns the unique hardware identifier of the monitor in the form SERIAL FUNCTIONID wakeupmonitor get_logicalName Returns the logical name of the monitor wakeupmonitor get_module Gets the YModule object for the device on which the function is located wakeupmonitor get_module_async callback context Gets the YModule object for the device on which the function is located asynchronous version
120. lue Returns the current value of the magnetic field in mT as a floating point number magnetometer get_errorMessage Returns the error message of the latest error with the magnetometer magnetometer get_errorType Returns the numerical error code of the latest error with the magnetometer magnetometer get_friendlyName Returns a global identifier of the magnetometer in the format MODULE_NAME FUNCT ION_NAME magnetometer get_functionDescriptor Returns a unique identifier of type YF UN_DESCR corresponding to the function magnetometer get_functionld Returns the hardware identifier of the magnetometer without reference to the module magnetometer get_hardwareld Returns the unique hardware identifier of the magnetometer in the form SERIAL FUNCTIONID 3 Reference magnetometer get_highestValue Returns the maximal value observed for the magnetic field since the device was started magnetometer get_logFrequency Returns the datalogger recording frequency for this function or OFF when measures are not stored in the data logger flash memory magnetometer get_logicalName Returns the logical name of the magnetometer magnetometer get_lowestValue Returns the minimal value observed for the magnetic field since the device was started magnetometer get_module Gets the YModule object for the device on which the function is located magnetometer get_module_async callb
121. m TYPE NAME SERTAL FUNCTIONID gyro get_advertisedValue Returns the current value of the gyroscope no more than 6 characters gyro get_currentRawValue Returns the uncalibrated unrounded raw value returned by the sensor in degrees per second as a floating point number gyro get_currentValue Returns the current value of the angular velocity in degrees per second as a floating point number gyro get_errorMessage Returns the error message of the latest error with the gyroscope gyro get_errorType Returns the numerical error code of the latest error with the gyroscope gyro get_friendlyName Returns a global identifier of the gyroscope in the format MODULE_NAME FUNCTION_NAME gyro get_functionDescriptor Returns a unique identifier of type YF UN_DESCR corresponding to the function gyro get_functionld Returns the hardware identifier of the gyroscope without reference to the module gyro get_hardwareld 3 Reference Returns the unique hardware identifier of the gyroscope in the form SERIAL FUNCTIONID gyro get_heading Returns the estimated heading angle based on the integration of gyroscopic measures combined with acceleration and magnetic field measurements gyro get_highestValue Returns the maximal value observed for the angular velocity since the device was started gyro get_logFrequency Re
122. m as a bidimensional table of numbers datastream get_dataSamplesintervalMs Returns the number of milliseconds between two consecutive rows of this data stream datastream get_duration Returns the approximate duration of this stream in seconds datastream get_maxValue Returns the largest measure observed within this stream datastream get_minValue Returns the smallest measure observed within this stream datastream get_rowCount Returns the number of data rows present in this stream datastream get_runIndex Returns the run index of the data stream datastream get_startTime Returns the relative start time of the data stream measured in seconds datastream get_startTimeUTC 3 Reference Returns the start time of the data stream relative to the Jan 1 1970 3 Reference 3 13 Digital IO function interface The Yoctopuce application programming interface allows you to switch the state of each bit of the I O port You can switch all bits at once or one by one The library can also automatically generate short pulses of a determined duration Electrical behavior of each I O can be modified open drain and reverse polarity In order to use the functions described here you should include lt script type text javascript src yocto_digitalio js gt lt script gt var yoctolib require yoctolib var YDigitallO yoctolib YDigitallO require_once yocto_digitalio php cpp _
123. n pressure get_recordedData startTime endTime Retrieves a DataSet object holding historical data for this sensor for a specified time interval pressure get_reportFrequency Returns the timed value notification frequency or OFF if timed value notifications are disabled for this function pressure get_resolution Returns the resolution of the measured values pressure get_unit Returns the measuring unit for the pressure pressure get_userData Returns the value of the userData attribute as previously stored using method set_userData pressure isOnline Checks if the pressure sensor is currently reachable without raising any error pressure isOnline_async callback context Checks if the pressure sensor is currently reachable without raising any error asynchronous version pressure load msValidity Preloads the pressure sensor cache with a specified validity duration pressure loadCalibrationPoints rawValues refValues Retrieves error correction data points previously entered using the method calibrateFromPoints pressure load_async msValidity callback context Preloads the pressure sensor cache with a specified validity duration asynchronous version pressure nextPressure Continues the enumeration of pressure sensors started using yFirstPressure pressure registerTimedReportCallback callback Registers the callback function that is invoked on every periodic timed notification
124. n ms during which the motor is driven at low frequency to help it start up motor set_userData data Stores a user context provided as argument in the userData attribute of the function motor wait_async callback context Waits for all pending asynchronous commands on the module to complete and invoke the user provided callback function 3 Reference 3 28 Network function interface YNetwork objects provide access to TCP IP parameters of Yoctopuce modules that include a built in network interface In order to use the functions described here you should include lt script type text javascript src yocto_network js gt lt script gt var yoctolib require yoctolib var YNetwork yoctolib Y Network require_once yocto_network php include yocto_network h import yocto_network h uses yocto_network yocto_network vb yocto_network cs import com yoctopuce YoctoAP Network from yocto_network import Global functions yFindNetwork func Retrieves a network interface for a given identifier yFirstNetwork Starts the enumeration of network interfaces currently accessible YNetwork methods network gt callbackLogin username password Connects to the notification callback and saves the credentials required to log into it network describe Returns a short text that describes unambiguously the instance of the network interface in the form TYPE NAME SERIAL FUNCTIONID
125. nc Retrieves an analog input for a given identifier yFirstAnButton Starts the enumeration of analog inputs currently accessible YAnButton methods anbutton describe Returns a short text that describes unambiguously the instance of the analog input in the form TYPE NAME SERIAL FUNCTIONID anbutton get_advertisedValue Returns the current value of the analog input no more than 6 characters anbutton get_analogCalibration Tells if a calibration process is currently ongoing anbutton get_calibratedValue Returns the current calibrated input value between 0 and 1000 included anbutton get_calibrationMax Returns the maximal value measured during the calibration between 0 and 4095 included anbutton get_calibrationMin Returns the minimal value measured during the calibration between 0 and 4095 included anbutton get_errorMessage Returns the error message of the latest error with the analog input anbutton get_errorType Returns the numerical error code of the latest error with the analog input anbutton get_friendlyName Returns a global identifier of the analog input in the format MODULE_NAME FUNCTION_NAME anbutton get_functionDescriptor Returns a unique identifier of type YF UN_DESCR corresponding to the function 3 Reference anbutton get_functionld Returns the hardware identifier of the analog input without reference to the module anbutton get_hardwareld
126. nction pwmoutput wait_async callback context Waits for all pending asynchronous commands on the module to complete and invoke the user provided callback function 3 Reference 3 34 PwmPowerSource function interface The Yoctopuce application programming interface allows you to configure the voltage source used by all PWM on the same device In order to use the functions described here you should include lt script type text javascript src yocto_pwmpowersource js gt lt script gt var yoctolib require yoctolib var YPwmPowerSource yoctolib YPwmPowerSource require_once yocto_pwmpowersource php include yocto_pwmpowersource h import yocto_pwmpowersource h uses yocto_pwmpowersource vb _ yocto_pwmpowersource vb cs yocto_pwmpowersource cs import com yoctopuce YoctoAP YPwmPowerSource from yocto_pwmpowersource import Global functions yFindPwmPowerSource func Retrieves a voltage source for a given identifier yFirstPwmPowerSource Starts the enumeration of Voltage sources currently accessible YPwmPowerSource methods pwmpowersource describe Returns a short text that describes unambiguously the instance of the voltage source in the form TYPE NAME SERIAL FUNCTIONID pwmpowersource gt get_advertisedValue Returns the current value of the voltage source no more than 6 characters pwmpowersource get_errorMessage Returns the error message of the latest error with th
127. ndTilt func Retrieves a tilt sensor for a given identifier yFirstTilt Starts the enumeration of tilt sensors currently accessible YTilt methods tilt gt calibrateFromPoints rawValues refValues Configures error correction data points in particular to compensate for a possible perturbation of the measure caused by an enclosure tilt gt describe Returns a short text that describes unambiguously the instance of the tilt sensor in the form TYPE NAME SERIAL FUNCTIONID tilt gt get_advertisedValue Returns the current value of the tilt sensor no more than 6 characters tilt gt get_currentRawValue Returns the uncalibrated unrounded raw value returned by the sensor in degrees as a floating point number tilt gt get_currentValue Returns the current value of the inclination in degrees as a floating point number tilt gt get_errorMessage Returns the error message of the latest error with the tilt sensor tilt gt get_errorType Returns the numerical error code of the latest error with the tilt sensor tilt gt get_friendlyName Returns a global identifier of the tilt sensor in the format MODULE_NAME FUNCTION_NAME tilt gt get_functionDescriptor Returns a unique identifier of type YF UN_DESCR corresponding to the function tilt gt get_functionld Returns the hardware identifier of the tilt sensor without reference to the module tilt gt get_hardwareld
128. nextCompass Continues the enumeration of compasses started using yFirstCompass compass gt registerTimedReportCallback callback Registers the callback function that is invoked on every periodic timed notification compass gt registerValueCallback callback Registers the callback function that is invoked on every change of advertised value compass set_highestValue newval Changes the recorded maximal value observed compass set_logFrequency newval Changes the datalogger recording frequency for this function 3 Reference compass set_logicalName newval Changes the logical name of the compass compass set_lowestValue newval Changes the recorded minimal value observed compass set_reportFrequency newval Changes the timed value notification frequency for this function compass set_resolution newval Changes the resolution of the measured physical values compass set_userData data Stores a user context provided as argument in the userData attribute of the function compass wait_async callback context Waits for all pending asynchronous commands on the module to complete and invoke the user provided callback function 3 Reference 3 8 Current function interface The Yoctopuce application programming interface allows you to read an instant measure of the sensor as well as the minimal and maximal values observed In order to use the functions described here you should include lt scr
129. nput 0 and so on digitalio get_userData Returns the value of the userData attribute as previously stored using method set_userData digitalio isOnline Checks if the digital IO port is currently reachable without raising any error digitalio isOnline_async callback context Checks if the digital IO port is currently reachable without raising any error asynchronous version digitalio gt load msValidity Preloads the digital IO port cache with a specified validity duration digitalioload_async msValidity callback context Preloads the digital IO port cache with a specified validity duration asynchronous version digitalio nextDigitallO Continues the enumeration of digital IO ports started using yF irstDigitalI0O digitalio pulse bitno ms_duration Triggers a pulse on a single bit for a specified duration digitalio registerValueCallback callback Registers the callback function that is invoked on every change of advertised value digitalio set_bitDirection bitno bitdirection Changes the direction of a single bit from the I O port digitalio set_bitOpenDrain bitno opendrain Changes the electrical interface of a single bit from the I O port digitalio set_bitPolarity bitno bitpolarity 3 Reference Changes the polarity of a single bit from the I O port digitalio set_bitState bitno bitstate Sets a single bit of the I O port digitalio set_logicalName newval Changes th
130. nsor as well as the minimal and maximal values observed In order to use the functions described here you should include lt script type text javascript src yocto_pressure js gt lt script gt var yoctolib require yoctolib var YPressure yoctolib Y Pressure require_once yocto_pressure php include yocto_pressure h import yocto_pressure h uses yocto_pressure yocto_pressure vb yocto_pressure cs import com yoctopuce YoctoAPI YPressure from yocto_pressure import Global functions yFindPressure func Retrieves a pressure sensor for a given identifier yFirstPressure Starts the enumeration of pressure sensors currently accessible YPressure methods pressure gt calibrateFromPoints rawValues refValues Configures error correction data points in particular to compensate for a possible perturbation of the measure caused by an enclosure pressure describe Returns a short text that describes unambiguously the instance of the pressure sensor in the form TYPE NAME SERIAL FUNCTIONID pressure get_advertisedValue Returns the current value of the pressure sensor no more than 6 characters pressure get_currentRawValue Returns the uncalibrated unrounded raw value returned by the sensor in millibar nPa as a floating point number pressure get_currentValue Returns the current value of the pressure in millibar hPa as a floating point number pressure
131. ntext Waits for all pending asynchronous commands on the module to complete and invoke the user provided callback function 3 Reference 3 7 Compass function interface The Yoctopuce application programming interface allows you to read an instant measure of the sensor as well as the minimal and maximal values observed In order to use the functions described here you should include lt script type text javascript src yocto_compass js gt lt script gt var yoctolib require yoctolib var YCompass yoctolib YCompass require_once yocto_compass php include yocto_compass h import yocto_compass h uses yocto_compass yocto_compass vb yocto_compass cs import com yoctopuce YoctoAPI YCompass from yocto_compass import Global functions yFindCompass func Retrieves a compass for a given identifier yFirstCompass Starts the enumeration of compasses currently accessible YCompass methods compass gt calibrateFromPoints rawValues refValues Configures error correction data points in particular to compensate for a possible perturbation of the measure caused by an enclosure compass describe Returns a short text that describes unambiguously the instance of the compass in the form TYPE NAME SERIAL FUNCTIONID compass get_advertisedValue Returns the current value of the compass no more than 6 characters compass get_currentRawValue Returns the uncalib
132. of the module informative leds module gt set_userData data Stores a user context provided as argument in the userData attribute of the function module set_userVar newval Returns the value previously stored in this attribute module triggerFirmwareUpdate secBeforeReboot Schedules a module reboot into special firmware update mode module updateFirmware path Prepare a firmware upgrade of the module module wait_async callback context Waits for all pending asynchronous commands on the module to complete and invoke the user provided callback function 3 Reference 3 27 Motor function interface Yoctopuce application programming interface allows you to drive the power sent to the motor to make it turn both ways but also to drive accelerations and decelerations The motor will then accelerate automatically you will not have to monitor it The API also allows to slow down the motor by shortening its terminals the motor will then act as an electromagnetic brake In order to use the functions described here you should include lt script type text javascript src yocto_motor js gt lt script gt var yoctolib require yoctolib var YMotor yoctolib Y Motor require_once yocto_motor php include yocto_motor h import yocto_motor h uses yocto_motor yocto_motor vb yocto_motor cs import com yoctopuce YoctoAPI YMotor from yocto_motor import Global functions yFindMotor func Retr
133. on describing the device estimated orientation based on the integration of gyroscopic measures combined with acceleration and magnetic field measurements gyro get_recordedData startTime endTime Retrieves a DataSet object holding historical data for this sensor for a specified time interval gyro get_reportFrequency Returns the timed value notification frequency or OFF if timed value notifications are disabled for this function gyro get_resolution Returns the resolution of the measured values gyro get_roll Returns the estimated roll angle based on the integration of gyroscopic measures combined with acceleration and magnetic field measurements gyro get_unit Returns the measuring unit for the angular velocity gyro get_userData Returns the value of the userData attribute as previously stored using method set_userData gyro get_xValue 3 Reference Returns the angular velocity around the X axis of the device as a floating point number gyro get_yValue Returns the angular velocity around the Y axis of the device as a floating point number gyro get_zValue Returns the angular velocity around the Z axis of the device as a floating point number gyro isOnline Checks if the gyroscope is currently reachable without raising any error gyro isOnline_async callback context Checks if the gyroscope is currently reachable without raising any error asynchronous version gyro
134. onDescriptor Returns a unique identifier of type YF UN_DESCR corresponding to the function refframe get_functionld Returns the hardware identifier of the reference frame without reference to the module refframe get_hardwareld Returns the unique hardware identifier of the reference frame in the form SERIAL FUNCTIONID refframe get_logicalName Returns the logical name of the reference frame refframe get_module Gets the YModule object for the device on which the function is located refframe get_module_async callback context Gets the YModule object for the device on which the function is located asynchronous version refframe get_mountOrientation Returns the installation orientation of the device as configured in order to define the reference frame for the compass and the pitch roll tilt sensors refframe get_mountPosition Returns the installation position of the device as configured in order to define the reference frame for the compass and the pitch roll tilt sensors refframe get_userData Returns the value of the userData attribute as previously stored using method set_userData refframe isOnline Checks if the reference frame is currently reachable without raising any error refframe isOnline_async callback context Checks if the reference frame is currently reachable without raising any error asynchronous version refframe load msValidity Preloads the refe
135. or get_friendlyName Returns a global identifier of the motor in the format MODULE_NAME FUNCT LON_NAMI Cd motor get_functionDescriptor Returns a unique identifier of type YF UN_DESCR corresponding to the function motor get_functionld Returns the hardware identifier of the motor without reference to the module motor get_hardwareld Returns the unique hardware identifier of the motor in the form SERIAL FUNCTIONID motor get_logicalName Returns the logical name of the motor motor get_module Gets the YModule object for the device on which the function is located motor get_module_async callback context Gets the YModule object for the device on which the function is located asynchronous version motor get_motorStatus Return the controller state motor get_overCurrentLimit Returns the current threshold in mA above which the controller automatically switches to error state motor get_starterTime Returns the duration in ms during which the motor is driven at low frequency to help it start up motor get_userData Returns the value of the userData attribute as previously stored using method set_userData motor isOnline Checks if the motor is currently reachable without raising any error motor isOnline_async callback context Checks if the motor is currently reachable without raising any error asynchronous ver
136. or localizedDescription return 1 wie eune 2 usage argv 0 NSString serial or name NSString stringWithUTF8String argv 1 use serial or logical name YModule module YModule FindModule serial or name if module isOnline at terge gt 2 4 if stremp argv 2 ON 0 module setBeacon Y BEACON ON else module setBeacon Y BEACON OFF NSLog serial S n module serialNumber NSLog logical name n module logicalName NSLog luminosity Sd n module luminosity NSLog beacon ey if module beacon Y BEACON ON NSLog ON n else NSLog OFF n NSLog upTime sld sec n module upTime 1000 NSLog USB current d mA n module usbCurrent NSLog logs n module get_lastLogs else NSLog S not connected check identification and USB cable n serial or name return 0 Each property xxx of the module can be read thanks to a method of type get _xxxx and properties which are not read only can be modified with the help of the set xxx method For more details regarding the used functions refer to the API chapters Changing the module settings When you want to modify the settings of a module you only need to call the corresponding set xxx function However this modification is performed only in the random access memory www yoctopuce com 5 2 Using Yocto Demo with Objective C RAM of the module if the mod
137. ort Global functions yFindDataLogger func Retrieves a data logger for a given identifier yFirstDataLogger Starts the enumeration of data loggers currently accessible YDataLogger methods datalogger describe Returns a short text that describes unambiguously the instance of the data logger in the form TYPE NAME SERIAL FUNCTIONID datalogger forgetAllDataStreams Clears the data logger memory and discards all recorded data streams datalogger get_advertisedValue Returns the current value of the data logger no more than 6 characters datalogger get_autoStart Returns the default activation state of the data logger on power up datalogger get_beaconDriven Return true if the data logger is synchronised with the localization beacon datalogger get_currentRunIndex Returns the current run number corresponding to the number of times the module was powered on with the dataLogger enabled at some point datalogger get_dataSets Returns a list of YDataSet objects that can be used to retrieve all measures stored by the data logger datalogger get_dataStreams v Builds a list of all data streams hold by the data logger legacy method datalogger get_errorMessage Returns the error message of the latest error with the data logger datalogger get_errorType Returns the numerical error code of the latest error with the data logger datalogger get_friendlyName 3 Reference Return
138. ous classes that you may have to use depending on the Yoctopuce device beeing used For more informations regarding the purpose and the usage of a given device attribute please refer to the extended discussion provided in the device specific user manual www yoctopuce com www yoctopuce com 2 Using Yocto Demo with Objective C Objective C is language of choice for programming on Mac OS X due to its integration with the Cocoa framework In order to use the Objective C library you need XCode version 4 2 earlier versions will not work available freely when you run Lion If you are still under Snow Leopard you need to be registered as Apple developer to be able to download XCode 4 2 The Yoctopuce library is ARC compatible You can therefore implement your projects either using the traditional retain release method or using the Automatic Reference Counting Yoctopuce Objective C libraries are integrally provided as source files A section of the low level library is written in pure C but you should not need to interact directly with it everything was done to ensure the simplest possible interaction from Objective C You will soon notice that the Objective C API defines many functions which return objects You do not need to deallocate these objects yourself the API does it automatically at the end of the application In order to keep them simple all the examples provided in this documentation are console applications Naturally
139. periodic timed notification voltage registerValueCallback callback Registers the callback function that is invoked on every change of advertised value voltage set_highestValue newval Changes the recorded maximal value observed voltage set_logFrequency newval Changes the datalogger recording frequency for this function voltage set_logicalName newval Changes the logical name of the voltage sensor 3 Reference voltage set_lowestValue newval Changes the recorded minimal value observed voltage set_reportFrequency newval Changes the timed value notification frequency for this function voltage set_resolution newval Changes the resolution of the measured physical values voltage set_userData data Stores a user context provided as argument in the userData attribute of the function voltage wait_async callback context Waits for all pending asynchronous commands on the module to complete and invoke the user provided callback function 3 Reference 3 46 Voltage source function interface Yoctopuce application programming interface allows you to control the module voltage output You affect absolute output values or make transitions In order to use the functions described here you should include lt script type text javascript src yocto_vsource js gt lt script gt require_once yocto_vsource php include yocto_vsource h import yocto_vsource h uses yocto_vsource yocto_v
140. pulse voltage ms_duration Sets device output to a specific volatage for a specified duration then brings it automatically to OV vsource registerValueCallback callback Registers the callback function that is invoked on every change of advertised value vsource set_logicalName newval Changes the logical name of the voltage source vsource set_userData data Stores a user context provided as argument in the userData attribute of the function vsource set_voltage newval Tunes the device output voltage milliVolts vsource voltageMove target ms_duration Performs a smooth move at constant speed toward a given value vsource wait_async callback context Waits for all pending asynchronous commands on the module to complete and invoke the user provided callback function 3 Reference 3 47 WakeUpMonitor function interface The WakeUpMonitor function handles globally all wake up sources as well as automated sleep mode In order to use the functions described here you should include lt script type text javascript src yocto_wakeupmonitor js gt lt script gt var yoctolib require yoctolib var YWakeUpMonitor yoctolib YWakeUpMonitor require_once yocto_wakeupmonitor php include yocto_wakeupmonitor h import yocto_wakeupmonitor h uses yocto_wakeupmonitor yocto_wakeupmonitor vb yocto_wakeupmonitor cs import com yoctopuce YoctoAP YWakeUpMonitor from yocto_wakeupmonitor import G
141. r yFirstSerialPort Starts the enumeration of serial ports currently accessible YSerialPort methods serialport describe Returns a short text that describes unambiguously the instance of the serial port in the form TYPE NAME SERIAL FUNCTIONID serialport gt get_CTS Read the level of the CTS line serialport get_advertisedValue Returns the current value of the serial port no more than 6 characters serialport get_errCount Returns the total number of communication errors detected since last reset serialport get_errorMessage Returns the error message of the latest error with the serial port serialport get_errorType Returns the numerical error code of the latest error with the serial port serialport get_friendlyName Returns a global identifier of the serial port in the format MODULE_NAME FUNCT ION_NAME serialport get_functionDescriptor Returns a unique identifier of type YF UN_DESCR corresponding to the function serialport get_functionld Returns the hardware identifier of the serial port without reference to the module serialport get_hardwareld Returns the unique hardware identifier of the serial port in the form SERIAL FUNCTIONID serialport get_lastMsg 3 Reference Returns the latest message fully received for Line Frame and Modbus protocols serialport get_logicalName Returns the logical name of the ser
142. r all pending asynchronous commands on the module to complete and invoke the user provided callback function 3 Reference 3 6 ColorLed function interface Yoctopuce application programming interface allows you to drive a color led using RGB coordinates as well as HSL coordinates The module performs all conversions form RGB to HSL automatically It is then self evident to turn on a led with a given hue and to progressively vary its saturation or lightness If needed you can find more information on the difference between RGB and HSL in the section following this one In order to use the functions described here you should include lt script type text javascript src yocto_colorled js gt lt script gt var yoctolib require yoctolib var YColorLed yoctolib YColorLed require_once yocto_colorled php include yocto_colorled h import yocto_colorled h uses yocto_colorled vb yocto_colorled vb yocto_colorled cs import com yoctopuce YoctoAPI YColorLed from yocto_colorled import Global functions yFindColorLed func Retrieves an RGB led for a given identifier yFirstColorLed Starts the enumeration of RGB leds currently accessible YColorLed methods colorled describe Returns a short text that describes unambiguously the instance of the RGB led in the form TYPE NAME SERIAL FUNCTIONID colorled get_advertisedValue Returns the current value of the RGB led no
143. rated unrounded raw value returned by the sensor in degrees as a floating point number compass get_currentValue Returns the current value of the relative bearing in degrees as a floating point number compass get_errorMessage Returns the error message of the latest error with the compass compass get_errorType Returns the numerical error code of the latest error with the compass compass get_friendlyName Returns a global identifier of the compass in the format MODULE_NAME FUNCT ION_NAME compass get_functionDescriptor Returns a unique identifier of type YF UN_DESCR corresponding to the function compass get_functionld Returns the hardware identifier of the compass without reference to the module compass get_hardwareld Returns the unique hardware identifier of the compass in the form SERIAL FUNCTIONID 3 Reference compass get_highestValue Returns the maximal value observed for the relative bearing since the device was started compass get_logFrequency Returns the datalogger recording frequency for this function or OFF when measures are not stored in the data logger flash memory compass get_logicalName Returns the logical name of the compass compass get_lowestValue Returns the minimal value observed for the relative bearing since the device was started compass get_magneticHeading Returns the magnetic heading regardless of the configured bearing
144. rded minimal value observed sensor set_reportFrequency newval Changes the timed value notification frequency for this function sensor set_resolution newval Changes the resolution of the measured physical values sensor set_userData data Stores a user context provided as argument in the userData attribute of the function sensor wait_async callback context Waits for all pending asynchronous commands on the module to complete and invoke the user provided callback function 3 Reference 3 40 SerialPort function interface The SerialPort function interface allows you to fully drive a Yoctopuce serial port to send and receive data and to configure communication parameters baud rate bit count parity flow control and protocol Note that Yoctopuce serial ports are not exposed as virtual COM ports They are meant to be used in the same way as all Yoctopuce devices In order to use the functions described here you should include lt script type text javascript src yocto_serialport js gt lt script gt var yoctolib require yoctolib var YSerialPort yoctolib SerialPort require_once yocto_serialport php cpp _ include yocto_serialport h import yocto_serialport h uses yocto_serialport yocto_serialport vb yocto_serialport cs import com yoctopuce YoctoAPI YSerialPort from yocto_serialport import Global functions yFindSerialPort func Retrieves a serial port for a given identifie
145. relay get_output Returns the output state of the relays when used as a simple switch single throw relay get_pulseTimer Returns the number of milliseconds remaining before the relays is returned to idle position state A during a measured pulse generation relay get_state Returns the state of the relays A for the idle position B for the active position relay get_stateAtPowerOn Returns the state of the relays at device startup A for the idle position B for the active position UNCHANGED for no change relay get_userData Returns the value of the userData attribute as previously stored using method set_userData relay isOnline Checks if the relay is currently reachable without raising any error relay isOnline_async callback context Checks if the relay is currently reachable without raising any error asynchronous version relay load msValidity Preloads the relay cache with a specified validity duration relay load_async msValidity callback context Preloads the relay cache with a specified validity duration asynchronous version relay nextRelay Continues the enumeration of relays started using yFirstRelay relay pulse ms_duration Sets the relay to output B active for a specified duration then brings it automatically back to output A idle state relay registerV alueCallback callback Registers the callback function that is invoked on every change of advertised v
146. rence frame cache with a specified validity duration refframe load_async msValidity callback context Preloads the reference frame cache with a specified validity duration asynchronous version refframe more3DCalibration Continues the sensors tridimensional calibration process previously initiated using method start3DCalibration refframe nextRefFrame Continues the enumeration of reference frames started using yFirstRefFrame refframe registerValueCallback callback Registers the callback function that is invoked on every change of advertised value refframe save3DCalibration Applies the sensors tridimensional calibration parameters that have just been computed refframe set_bearing newval Changes the reference bearing used by the compass refframe set_logicalName newval 3 Reference Changes the logical name of the reference frame refframe set_mountPosition position orientation Changes the compass and tilt sensor frame of reference refframe set_userData data Stores a user context provided as argument in the userData attribute of the function refframe start3DCalibration Initiates the sensors tridimensional calibration process refframe wait_async callback context Waits for all pending asynchronous commands on the module to complete and invoke the user provided callback function 3 Reference 3 38 Relay function interface The Yoctopuce application programming interf
147. rent sensor current get_friendlyName Returns a global identifier of the current sensor in the format MODULE_NAME FUNCTION_NAME current get_functionDescriptor Returns a unique identifier of type YF UN_DESCR corresponding to the function current get_functionld Returns the hardware identifier of the current sensor without reference to the module current get_hardwareld Returns the unique hardware identifier of the current sensor in the form SERIAL FUNCTIONID 3 Reference current get_highestValue Returns the maximal value observed for the current since the device was started current get_logFrequency Returns the datalogger recording frequency for this function or OFF when measures are not stored in the data logger flash memory current get_logicalName Returns the logical name of the current sensor current get_lowestValue Returns the minimal value observed for the current since the device was started current get_module Gets the YModule object for the device on which the function is located current gt get_module_async callback context Gets the YModule object for the device on which the function is located asynchronous version current get_recordedData startTime endTime Retrieves a DataSet object holding historical data for this sensor for a specified time interval current get_reportFrequency Returns the timed value notification frequency or OFF i
148. rns the current value of the power control no more than 6 characters dualpower get_errorMessage Returns the error message of the latest error with the power control dualpower get_errorType Returns the numerical error code of the latest error with the power control dualpower get_extVoltage Returns the measured voltage on the external power source in millivolts dualpower get_friendlyName Returns a global identifier of the power control in the format MODULE_NAME FUNCT ION_NAMI Gl dualpower get_functionDescriptor Returns a unique identifier of type YF UN_DESCR corresponding to the function dualpower get_functionld Returns the hardware identifier of the power control without reference to the module dualpower get_hardwareld Returns the unique hardware identifier of the power control in the form SERIAL FUNCTIONID dualpower get_logicalName Returns the logical name of the power control dualpower get_module 3 Reference Gets the YModule object for the device on which the function is located dualpower get_module_async callback context Gets the YModule object for the device on which the function is located asynchronous version dualpower get_powerControl Returns the selected power source for module functions that require lots of current dualpower get_powerState Returns the current power source for module functions that require lots of current du
149. rror pwmoutput isOnline_async callback context Checks if the PWM is currently reachable without raising any error asynchronous version pwmoutput load msValidity Preloads the PWM cache with a specified validity duration pwmoutput load_async msValidity callback context Preloads the PWM cache with a specified validity duration asynchronous version pwmoutput nextPwmOutput Continues the enumeration of PWMs started using yFirstPwmOutput pwmoutput pulseDurationMove ms_target ms_duration Performs a smooth transistion of the pulse duration toward a given value pwmoutput registerValueCallback callback Registers the callback function that is invoked on every change of advertised value pwmoutput set_dutyCycle newval Changes the PWM duty cycle in per cents pwmoutput set_dutyCycleAtPowerOn newval Changes the PWM duty cycle at device power on pwmoutput set_enabled newval Stops or starts the PWM pwmoutput set_enabledAtPowerOn newval Changes the state of the PWM at device power on pwmoutput set_frequency newval Changes the PWM frequency pwmoutput set_logicalName newval Changes the logical name of the PWM pwmoutput set_period newval Changes the PWM period in milliseconds 3 Reference pwmoutput set_pulseDuration newval Changes the PWM pulse length in milliseconds pwmoutput set_userData data Stores a user context provided as argument in the userData attribute of the fu
150. rtised value humidity set_highestValue newval Changes the recorded maximal value observed humidity set_logFrequency newval Changes the datalogger recording frequency for this function humidity set_logicalName newval Changes the logical name of the humidity sensor 3 Reference humidity set_lowestValue newval Changes the recorded minimal value observed humidity set_reportFrequency newval Changes the timed value notification frequency for this function humidity set_resolution newval Changes the resolution of the measured physical values humidity set_userData data Stores a user context provided as argument in the userData attribute of the function humidity wait_async callback context Waits for all pending asynchronous commands on the module to complete and invoke the user provided callback function 3 Reference 3 22 Led function interface Yoctopuce application programming interface allows you not only to drive the intensity of the led but also to have it blink at various preset frequencies In order to use the functions described here you should include lt script type text javascript src yocto_led js gt lt script gt var yoctolib require yoctolib var YLed yoctolib YLed require_once yocto_led php include yocto_led h import yocto_led h uses yocto_led yocto_led vb yocto_led cs import com yoctopuce YoctoAPI YLed from yocto_led import
151. rts the enumeration of watchdog currently accessible YWatchdog methods watchdog delayedPulse ms_delay ms_duration Schedules a pulse watchdog describe Returns a short text that describes unambiguously the instance of the watchdog in the form TYPE NAME SERIAL FUNCTIONID watchdog get_advertisedValue Returns the current value of the watchdog no more than 6 characters watchdog get_autoStart Returns the watchdog runing state at module power on watchdog get_countdown Returns the number of milliseconds remaining before a pulse delayedPulse call When there is no scheduled pulse returns zero watchdog get_errorMessage Returns the error message of the latest error with the watchdog watchdog get_errorType Returns the numerical error code of the latest error with the watchdog watchdog get_friendlyName Returns a global identifier of the watchdog in the format MODULE_NAME FUNCTION_NAME watchdog get_functionDescriptor Returns a unique identifier of type YF UN_DESCR corresponding to the function watchdog get_functionld Returns the hardware identifier of the watchdog without reference to the module 3 Reference watchdog get_hardwareld Returns the unique hardware identifier of the watchdog in the form SERIAL FUNCTIONID watchdog get_logicalName Returns the logical name of the watchdog watchdog get_maxTimeOnStateA Retourne th
152. s network set_callbackEncoding newval Changes the encoding standard to use for representing notification values network set_callbackMaxDelay newval Changes the maximum waiting time between two callback notifications in seconds network set_callbackMethod newval Changes the HTTP method used to notify callbacks for significant state changes network set_callbackMinDelay newval Changes the minimum waiting time between two callback notifications in seconds network set_callbackUrl newval Changes the callback URL to notify significant state changes network set_discoverable newval Changes the activation state of the multicast announce protocols to allow easy discovery of the module in the network neighborhood uPnP Bonjour protocol network set_logicalName newval Changes the logical name of the network interface network set_primaryDNS newval Changes the IP address of the primary name server to be used by the module network set_secondaryDNS newval Changes the IP address of the secondary name server to be used by the module network set_userData data Stores a user context provided as argument in the userData attribute of the function network set_userPassword newval Changes the password for the user user network set_wwwWatchdogDelay newval Changes the allowed downtime of the WWW link in seconds before triggering an automated reboot to try to recover Internet connectivity network useDHCP
153. s refframe describe Returns a short text that describes unambiguously the instance of the reference frame in the form TYPE NAME SERIAL FUNCTIONID refframe get_3DCalibrationHint Returns instructions to proceed to the tridimensional calibration initiated with method start3DCalibration refframe get_3DCalibrationLogMsg Returns the latest log message from the calibration process refframe get_3DCalibrationProgress Returns the global process indicator for the tridimensional calibration initiated with method start3DCalibration refframe get_3DCalibrationStage Returns index of the current stage of the calibration initiated with method start 3DCalibration refframe get_3DCalibrationStageProgress Returns the process indicator for the current stage of the calibration initiated with method start3DCalibration refframe get_advertisedValue Returns the current value of the reference frame no more than 6 characters refframe get_bearing Returns the reference bearing used by the compass 3 Reference refframe get_errorMessage Returns the error message of the latest error with the reference frame refframe get_errorType Returns the numerical error code of the latest error with the reference frame refframe get_friendlyName Returns a global identifier of the reference frame in the format MODULE_NAME FUNCTION_NAME refframe get_functi
154. s a global identifier of the data logger in the format MODULE_NAME FUNCT ION_NAME datalogger get_functionDescriptor Returns a unique identifier of type YF UN_DESCR corresponding to the function datalogger get_functionld Returns the hardware identifier of the data logger without reference to the module datalogger get_hardwareld Returns the unique hardware identifier of the data logger in the form SERIAL FUNCTIONID datalogger get_logicalName Returns the logical name of the data logger datalogger get_module Gets the YModule object for the device on which the function is located datalogger get_module_async callback context Gets the YModule object for the device on which the function is located asynchronous version datalogger get_recording Returns the current activation state of the data logger datalogger get_timeUTC Returns the Unix timestamp for current UTC time if known datalogger get_userData Returns the value of the userData attribute as previously stored using method set_userData datalogger isOnline Checks if the data logger is currently reachable without raising any error datalogger isOnline_async callback context Checks if the data logger is currently reachable without raising any error asynchronous version datalogger load msValidity Preloads the data logger cache with a specified validity duration datalogger load_async msValidity callback cont
155. s on some devices for instance to design a custom web UI for networked devices or to add fonts on display devices In order to use the functions described here you should include lt script type text javascript src yocto_files js gt lt script gt var yoctolib require yoctolib var YFiles yoctolib YFiles require_once yocto_files php include yocto_files h import yocto_files h uses yocto_files yocto_files vb yocto_files cs import com yoctopuce YoctoAPI YEFiles from yocto_files import Global functions yFindFiles func Retrieves a filesystem for a given identifier yFirstFiles Starts the enumeration of filesystems currently accessible YFiles methods files describe Returns a short text that describes unambiguously the instance of the filesystem in the form TYPE NAME SERIAL FUNCTIONID files gt download pathname Downloads the requested file and returns a binary buffer with its content files download_async pathname callback context Downloads the requested file and returns a binary buffer with its content files format_fs Reinitialize the filesystem to its clean unfragmented empty state files gt get_advertisedValue Returns the current value of the filesystem no more than 6 characters files get_errorMessage Returns the error message of the latest error with the filesystem files get_errorType Returns the numerical error co
156. s previously stored using method set_userData oscontrol isOnline Checks if the OS control is currently reachable without raising any error oscontrol isOnline_async callback context Checks if the OS control is currently reachable without raising any error asynchronous version oscontrol load msValidity Preloads the OS control cache with a specified validity duration oscontrol gt load_async msValidity callback context Preloads the OS control cache with a specified validity duration asynchronous version oscontrol nextOsControl Continues the enumeration of OS control started using yFirstOsControl oscontrol registerValueCallback callback Registers the callback function that is invoked on every change of advertised value oscontrol set_logicalName newval Changes the logical name of the OS control oscontrol set_userData data Stores a user context provided as argument in the userData attribute of the function oscontrol shutdown secBeforeShutDown Schedules an OS shutdown after a given number of seconds oscontrolwait_async callback context Waits for all pending asynchronous commands on the module to complete and invoke the user provided callback function 3 Reference 3 30 Power function interface The Yoctopuce application programming interface allows you to read an instant measure of the sensor as well as the minimal and maximal values observed In order to use the functions described here
157. s when the wake up should happen In order to use the functions described here you should include lt script type text javascript src yocto_wakeupschedule js gt lt script gt var yoctolib require yoctolib var YWakeUpSchedule yoctolib YWakeUpSchedule require_once yocto_wakeupschedule php cpp _ include yocto_wakeupschedule h import yocto_wakeupschedule h uses yocto_wakeupschedule yocto_wakeupschedule vb yocto_wakeupschedule cs import com yoctopuce YoctoAPI YWakeUpSchedule from yocto_wakeupschedule import Global functions yFindWakeUpSchedule func Retrieves a wake up schedule for a given identifier yFirstWakeUpSchedule Starts the enumeration of wake up schedules currently accessible YWakeUpSchedule methods wakeupschedule describe Returns a short text that describes unambiguously the instance of the wake up schedule in the form TYPE NAME SERIAL FUNCTIONID wakeupschedule get_advertisedValue Returns the current value of the wake up schedule no more than 6 characters wakeupschedule get_errorMessage Returns the error message of the latest error with the wake up schedule wakeupschedule get_errorType Returns the numerical error code of the latest error with the wake up schedule wakeupschedule get_friendlyName Returns a global identifier of the wake up schedule in the format MODULE_NAME FUNCT ION_NAME wakeupschedule get_functionDescriptor Returns a uniqu
158. sed by the device network get_userData Returns the value of the userData attribute as previously stored using method set_userData network get_userPassword Returns a hash string if a password has been set for user user or an empty string otherwise network get_wwwWatchdogDelay Returns the allowed downtime of the WWW link in seconds before triggering an automated reboot to try to recover Internet connectivity network gt isOnline Checks if the network interface is currently reachable without raising any error network isOnline_async callback context Checks if the network interface is currently reachable without raising any error asynchronous version 3 Reference network load msValidity Preloads the network interface cache with a specified validity duration network load_async msValidity callback context Preloads the network interface cache with a specified validity duration asynchronous version network nextNetwork Continues the enumeration of network interfaces started using yFirstNetwork network ping host Pings str_host to test the network connectivity network gt registerValueCallback callback Registers the callback function that is invoked on every change of advertised value network set_adminPassword newval Changes the password for the admin user network set_callbackCredentials newval Changes the credentials required to connect to the callback addres
159. serialport gt queryLine query maxWait Sends a text line query to the serial port and reads the reply if any serialport gt queryMODBUS slaveNo pduBytes Sends a message to a specified MODBUS slave connected to the serial port and reads the reply if any serialport gt readHex nBytes Reads data from the receive buffer as a hexadecimal string starting at current stream position serialport readLine Reads a single line or message from the receive buffer starting at current stream position serialport gt readMessages pattern maxWait Searches for incoming messages in the serial port receive buffer matching a given pattern starting at current position serialport readStr nChars Reads data from the receive buffer as a string starting at current stream position serialport gt read_seek rxCountVal Changes the current internal stream position to the specified value serialport registerValueCallback callback Registers the callback function that is invoked on every change of advertised value serialport reset Clears the serial port buffer and resets counters to zero serialport set_RTSvval Manually sets the state of the RTS line serialport set_logicalName newval Changes the logical name of the serial port serialport set_protocol newval Changes the type of protocol used over the serial line serialport set_serialMode newval Changes the serial port communication parameters with a string such as
160. sion motor keepALive Rearms the controller failsafe timer motor load msValidity Preloads the motor cache with a specified validity duration motor load_async msValidity callback context Preloads the motor cache with a specified validity duration asynchronous version motor nextMotor Continues the enumeration of motors started using yFirstMotor motor registerValueCallback callback Registers the callback function that is invoked on every change of advertised value motor resetStatus Reset the controller state to IDLE motor set_brakingForce newval Changes immediately the braking force applied to the motor in percents motor set_cutOffVoltage newval Changes the threshold voltage under which the controller automatically switches to error state and prevents further current draw 3 Reference motor set_drivingForce newval Changes immediately the power sent to the motor motor set_failSafeTimeout newval Changes the delay in milliseconds allowed for the controller to run autonomously without receiving any instruction from the control process motor set_frequency newval Changes the PWM frequency used to control the motor motor set_logicalName newval Changes the logical name of the motor motor set_overCurrentLimit newval Changes the current threshold in mA above which the controller automatically switches to error state motor set_starterTime newval Changes the duration i
161. source vb yocto_vsource cs import com yoctopuce YoctoAPI YVSource from yocto_vsource import Global functions yFindVSource func Retrieves a voltage source for a given identifier yFirstVSource Starts the enumeration of voltage sources currently accessible YVSource methods vsource describe Returns a short text that describes the function in the form TYPE NAME SERIAL FUNCTIONID vsource get_advertisedValue Returns the current value of the voltage source no more than 6 characters vsource get_errorMessage Returns the error message of the latest error with this function vsource get_errorType Returns the numerical error code of the latest error with this function vsource get_extPowerFailure Returns true if external power supply voltage is too low vsource get_failure Returns true if the module is in failure mode vsource get_friendlyName Returns a global identifier of the function in the format MODULE_NAME FUNCTION_NAME vsource get_functionDescriptor Returns a unique identifier of type YF UN_DESCR corresponding to the function vsource get_functionld Returns the hardware identifier of the function without reference to the module vsource get_hardwareld Returns the unique hardware identifier of the function in the form SERTAL FUNCTIONID vsource get_logicalName Returns the logical name of the voltage source vsource get_module
162. specified time interval humidity get_reportFrequency Returns the timed value notification frequency or OFF if timed value notifications are disabled for this function humidity get_resolution Returns the resolution of the measured values humidity get_unit Returns the measuring unit for the humidity humidity get_userData Returns the value of the userData attribute as previously stored using method set_userData humidity isOnline Checks if the humidity sensor is currently reachable without raising any error humidity isOnline_async callback context Checks if the humidity sensor is currently reachable without raising any error asynchronous version humidity load msValidity Preloads the humidity sensor cache with a specified validity duration humidity loadCalibrationPoints rawValues refValues Retrieves error correction data points previously entered using the method calibrateFromPoints humidity gt load_async msValidity callback context Preloads the humidity sensor cache with a specified validity duration asynchronous version humidity nextHumidity Continues the enumeration of humidity sensors started using yF irstHumidity humidity registerTimedReportCallback callback Registers the callback function that is invoked on every periodic timed notification humidity registerValueCallback callback Registers the callback function that is invoked on every change of adve
163. starts the servo servo set_enabledAtPowerOn newval Configure the servo signal generator state at power up servo set_logicalName newval Changes the logical name of the servo servo set_neutral newval Changes the duration of the pulse corresponding to the neutral position of the servo servo set_position newval Changes immediately the servo driving position servo set_positionAtPowerOn newval Configure the servo position at device power up servo set_range newval Changes the range of use of the servo specified in per cents servo set_userData data Stores a user context provided as argument in the userData attribute of the function servo wait_async callback context 3 Reference Waits for all pending asynchronous commands on the module to complete and invoke the user provided callback function 3 Reference 3 42 Temperature function interface The Yoctopuce application programming interface allows you to read an instant measure of the sensor as well as the minimal and maximal values observed In order to use the functions described here you should include lt script type text javascript src yocto_temperature js gt lt script gt var yoctolib require yoctolib var YTemperature yoctolib Y Temperature require_once yocto_temperature php include yocto_temperature h import yocto_temperature h uses yocto_temperature yocto_temperature vb yocto_temperatur
164. t yocto_display h uses yocto_display yocto_display vb yocto_display cs import com yoctopuce YoctoAPI YDisplay from yocto_display import YDisplayLayer methods displaylayer clear Erases the whole content of the layer makes it fully transparent displaylayer clearConsole Blanks the console area within console margins and resets the console pointer to the upper left corner of the console displaylayer consoleOut text Outputs a message in the console area and advances the console pointer accordingly displaylayer drawBar x1 y1 x2 y2 Draws a filled rectangular bar at a specified position displaylayer drawBitmap x y w bitmap bgcol Draws a bitmap at the specified position displaylayer drawCircle x y r Draws an empty circle at a specified position displaylayer drawDisc x y r Draws a filled disc at a given position displaylayer drawlmage x y imagename Draws a GIF image at the specified position displaylayer drawPixel x y Draws a single pixel at the specified position displaylayer drawRect x1 y1 x2 y2 Draws an empty rectangle at a specified position displaylayer drawText x y anchor text Draws a text string at the specified position displaylayer get_display Gets parent YDisplay displaylayer get_displayHeight Returns the display height in pixels displaylayer get_displayWidth Returns the display width in pixels 3 Reference displayla
165. t h import yocto_pwminput h uses yocto_pwminput vb _ yocto_pwminput vb cs _ yocto_pwminput cs import com yoctopuce YoctoAPI YPwminput from yocto_pwminput import Global functions yFindPwminput func Retrieves a voltage sensor for a given identifier yFirstPwmInput Starts the enumeration of voltage sensors currently accessible YPwmInput methods pwminput calibrateFromPoints rawValues refValues Configures error correction data points in particular to compensate for a possible perturbation of the measure caused by an enclosure pwminput describe Returns a short text that describes unambiguously the instance of the voltage sensor in the form TYPE NAME SERIAL FUNCTIONID pwminput get_advertisedValue Returns the current value of the voltage sensor no more than 6 characters pwminput get_currentRawValue Returns the uncalibrated unrounded raw value returned by the sensor in Volt as a floating point number pwminput get_currentValue Returns the current value of Pwminput feature as a floating point number pwminput get_dutyCycle Returns the PWM duty cycle in per cents pwminput get_errorMessage Returns the error message of the latest error with the voltage sensor pwminput get_errorType Returns the numerical error code of the latest error with the voltage sensor pwminput get_frequency Returns the PWM frequency in Hz pwminput get_friendlyNam
166. t stored in the data logger flash memory carbondioxide get_logicalName Returns the logical name of the CO2 sensor carbondioxide get_lowestValue Returns the minimal value observed for the CO2 concentration since the device was started carbondioxide get_module Gets the YModule object for the device on which the function is located carbondioxide get_module_async callback context Gets the YModule object for the device on which the function is located asynchronous version carbondioxide get_recordedData startTime endTime Retrieves a DataSet object holding historical data for this sensor for a specified time interval carbondioxide get_reportFrequency Returns the timed value notification frequency or OFF if timed value notifications are disabled for this function carbondioxide get_resolution Returns the resolution of the measured values carbondioxide get_unit Returns the measuring unit for the CO2 concentration carbondioxide get_userData Returns the value of the userData attribute as previously stored using method set_userData carbondioxide isOnline Checks if the CO2 sensor is currently reachable without raising any error carbondioxide isOnline_async callback context Checks if the CO2 sensor is currently reachable without raising any error asynchronous version carbondioxide load msValidity Preloads the CO2 sensor cache with a specified validity duration carbondio
167. tTimeUTC Returns the start time of the data run relative to the Jan 1 1970 If the UTC time was not set in the datalogger at any time during the recording of this data run and if this is not the current run this method returns 0 Returns an unsigned number corresponding to the number of seconds between the Jan 1 1970 and the beginning of this data run i e Unix time representation of the absolute time 3 Reference 3 11 Recorded data sequence YDataSet objects make it possible to retrieve a set of recorded measures for a given sensor and a specified time interval They can be used to load data points with a progress report When the YDataSet object is instantiated by the get_recordedData function no data is yet loaded from the module It is only when the loadMore method is called over and over than data will be effectively loaded from the dataLogger A preview of available measures is available using the function get_preview as soon as loadMore has been called once Measures themselves are available using function get_measures when loaded by subsequent calls to loadMore This class can only be used on devices that use a recent firmware as YDataSet objects are not supported by firmwares older than version 13000 In order to use the functions described here you should include lt script type text javascript src yocto_api js gt lt script gt var yoctolib require yoctolib var YAPI
168. tValue Returns the maximal value observed for the altitude since the device was started altitude get_logFrequency Returns the datalogger recording frequency for this function or OFF when measures are not stored in the data logger flash memory altitude get_logicalName Returns the logical name of the altimeter altitude get_lowestValue Returns the minimal value observed for the altitude since the device was started altitude get_module Gets the YModule object for the device on which the function is located altitude get_module_async callback context Gets the YModule object for the device on which the function is located asynchronous version altitude get_qnh Returns the barometric pressure adjusted to sea level used to compute the altitude QNH altitude get_recordedData startTime endTime Retrieves a DataSet object holding historical data for this sensor for a specified time interval altitude get_reportFrequency Returns the timed value notification frequency or OFF if timed value notifications are disabled for this function altitude get_resolution Returns the resolution of the measured values altitude get_unit Returns the measuring unit for the altitude altitude get_userData Returns the value of the userData attribute as previously stored using method set_userData altitude isOnline Checks if the altimeter is currently reachable without raising any
169. the function is located asynchronous version voltage get_recordedData startTime endTime Retrieves a DataSet object holding historical data for this sensor for a specified time interval voltage get_reportFrequency Returns the timed value notification frequency or OFF if timed value notifications are disabled for this function voltage get_resolution Returns the resolution of the measured values voltage get_unit Returns the measuring unit for the voltage voltage get_userData Returns the value of the userData attribute as previously stored using method set_userData voltage isOnline Checks if the voltage sensor is currently reachable without raising any error voltage isOnline_async callback context Checks if the voltage sensor is currently reachable without raising any error asynchronous version voltage load msValidity Preloads the voltage sensor cache with a specified validity duration voltage loadCalibrationPoints rawValues refValues Retrieves error correction data points previously entered using the method calibrateFromPoints voltage load_async msValidity callback context Preloads the voltage sensor cache with a specified validity duration asynchronous version voltage nextVoltage Continues the enumeration of voltage sensors started using yFirstVoltage voltage registerTimedReportCallback callback Registers the callback function that is invoked on every
170. ts or coil status from a MODBUS serial device serialport gt modbusReadInputBits slaveNo pduAddr nBits Reads one or more contiguous input bits or discrete inputs from a MODBUS serial device serialport gt modbusReadInputRegisters slaveNo pduAddr nWords Reads one or more contiguous input registers read only registers from a MODBUS serial device serialport gt modbusReadRegisters slaveNo pduAddr nWords Reads one or more contiguous internal registers holding registers from a MODBUS serial device serialport gt modbusWriteAndReadRegisters slaveNo pduWriteAddr values pduReadAddr nReadWords Sets several contiguous internal registers holding registers on a MODBUS serial device then performs a contiguous read of a set of possibly different internal registers serialport gt modbusWriteBit slaveNo pduAddr value Sets a single internal bit or coil on a MODBUS serial device serialport gt modbusWriteBits slaveNo pduAddr bits Sets several contiguous internal bits or coils on a MODBUS serial device serialport gt modbusWriteRegister slaveNo pduAddr value Sets a single internal register or holding register on a MODBUS serial device serialport gt modbusWriteRegisters slaveNo pduAddr values 3 Reference Sets several contiguous internal registers or holding registers on a MODBUS serial device serialport nextSerialPort Continues the enumeration of serial ports started using yFirstSerialPort
171. tude set_reportFrequency newval Changes the timed value notification frequency for this function altitude set_resolution newval Changes the resolution of the measured physical values altitude set_userData data Stores a user context provided as argument in the userData attribute of the function altitude wait_async callback context Waits for all pending asynchronous commands on the module to complete and invoke the user provided callback function 3 Reference 3 4 AnButton function interface Yoctopuce application programming interface allows you to measure the state of a simple button as well as to read an analog potentiometer variable resistance This can be use for instance with a continuous rotating knob a throttle grip or a joystick The module is capable to calibrate itself on min and max values in order to compute a calibrated value that varies proportionally with the potentiometer position regardless of its total resistance In order to use the functions described here you should include lt script type text javascript src yocto_anbutton js gt lt script gt var yoctolib require yoctolib var YAnButton yoctolib YAnButton require_once yocto_anbutton php include yocto_anbutton h import yocto_anbutton h uses yocto_anbutton vb yocto_anbutton vb yocto_anbutton cs import com yoctopuce YoctoAPI YAnButton from yocto_anbutton import Global functions yFindAnButton fu
172. turns the current value of the voltage in Volt as a floating point number voltage get_errorMessage Returns the error message of the latest error with the voltage sensor voltage get_errorType Returns the numerical error code of the latest error with the voltage sensor voltage get_friendlyName Returns a global identifier of the voltage sensor in the format MODULE_NAME FUNCTION_NAME voltage get_functionDescriptor Returns a unique identifier of type YF UN_DESCR corresponding to the function voltage get_functionld Returns the hardware identifier of the voltage sensor without reference to the module voltage get_hardwareld Returns the unique hardware identifier of the voltage sensor in the form SERIAL FUNCTIONID 3 Reference voltage get_highestValue Returns the maximal value observed for the voltage since the device was started voltage get_logFrequency Returns the datalogger recording frequency for this function or OFF when measures are not stored in the data logger flash memory voltage get_logicalName Returns the logical name of the voltage sensor voltage get_lowestValue Returns the minimal value observed for the voltage since the device was started voltage get_module Gets the YModule object for the device on which the function is located voltage get_module_async callback context Gets the YModule object for the device on which
173. turns the datalogger recording frequency for this function or OFF when measures are not stored in the data logger flash memory gyro get_logicalName Returns the logical name of the gyroscope gyro get_lowestValue Returns the minimal value observed for the angular velocity since the device was started gyro get_module Gets the YModule object for the device on which the function is located gyro get_module_async callback context Gets the YModule object for the device on which the function is located asynchronous version gyro get_pitch Returns the estimated pitch angle based on the integration of gyroscopic measures combined with acceleration and magnetic field measurements gyro get_quaternionW Returns the w component real part of the quaternion describing the device estimated orientation based on the integration of gyroscopic measures combined with acceleration and magnetic field measurements gyro get_quaternionX Returns the x component of the quaternion describing the device estimated orientation based on the integration of gyroscopic measures combined with acceleration and magnetic field measurements gyro get_quaternionY Returns the y component of the quaternion describing the device estimated orientation based on the integration of gyroscopic measures combined with acceleration and magnetic field measurements gyro get_quaternionZ Returns the x component of the quaterni
174. ty duration asynchronous version lightsensor nextLightSensor Continues the enumeration of light sensors started using yFirstLightSensor lightsensor registerTimedReportCallback callback Registers the callback function that is invoked on every periodic timed notification lightsensor registerValueCallback callback Registers the callback function that is invoked on every change of advertised value lightsensor set_highestValue newval 3 Reference Changes the recorded maximal value observed lightsensor set_logFrequency newval Changes the datalogger recording frequency for this function lightsensor set_logicalName newval Changes the logical name of the light sensor lightsensor set_lowestValue newval Changes the recorded minimal value observed lightsensor set_measureType newval Modify the light sensor type used in the device lightsensor set_reportFrequency newval Changes the timed value notification frequency for this function lightsensor set_resolution newval Changes the resolution of the measured physical values lightsensor set_userData data Stores a user context provided as argument in the userData attribute of the function lightsensor wait_async callback context Waits for all pending asynchronous commands on the module to complete and invoke the user provided callback function 3 Reference 3 24 Magnetometer function interface The Yoctopuce application
175. ude methods altitude calibrateFromPoints rawValues refValues Configures error correction data points in particular to compensate for a possible perturbation of the measure caused by an enclosure altitude describe Returns a short text that describes unambiguously the instance of the altimeter in the form TYPE NAME SERIAL FUNCTIONID altitude get_advertisedValue Returns the current value of the altimeter no more than 6 characters altitude get_currentRawValue Returns the uncalibrated unrounded raw value returned by the sensor in meters as a floating point number altitude get_currentValue Returns the current value of the altitude in meters as a floating point number altitude get_errorMessage Returns the error message of the latest error with the altimeter altitude get_errorType Returns the numerical error code of the latest error with the altimeter altitude get_friendlyName Returns a global identifier of the altimeter in the format MODULE_NAME FUNCT ION_NAME altitude get_functionDescriptor Returns a unique identifier of type YF UN_DESCR corresponding to the function altitude get_functionld Returns the hardware identifier of the altimeter without reference to the module altitude get_hardwareld Returns the unique hardware identifier of the altimeter in the form SERIAL FUNCTIONID 3 Reference altitude get_highes
176. ule is restarted the modifications are lost To memorize them persistently it is necessary to ask the module to save its current configuration in its permanent memory To do so use the saveToFlash method Inversely it is possible to force the module to forget its current settings by using the revertFromFlash method The short example below allows you to modify the logical name of a module import lt Foundation Foundation h gt import yocto_api h static void usage const char exe NSLog usage s lt serial gt lt newLogicalName gt n exe ezit i 7 int Mein Vint aroe const Char argv NSError error autoreleasepool Setup the API to use local USB devices dh VAP Reg use rHubi tusbls error i VAPT SUCCESSI NSiogi MRegisterkub vernon san erron WocaluzedDeseruptLoni r return 1 Atlande 2 usage argv 0 NSString serial or name NSString stringWithUTF8String argv 1 use serial or logical name YModule module YModule FindModule serial or name if module isOnline if argc gt 3 NSString newname NSString stringWithUTF8String argv 2 if YAPI CheckLogicalName newname NSLog Invalid name n newname usage argv 0 module logicalName newname module saveToFlash NSLog Current name n module logicalName else NSLog not connected check identification and USB cable n seriel or mene return 0
177. urns the measuring unit for the value qt get_userData Returns the value of the userData attribute as previously stored using method set_userData qt isOnline Checks if the quaternion component is currently reachable without raising any error qt isOnline_async callback context Checks if the quaternion component is currently reachable without raising any error asynchronous version qt load msValidity Preloads the quaternion component cache with a specified validity duration qt loadCalibrationPoints rawValues refValues Retrieves error correction data points previously entered using the method calibrateFromPoints qt load_async msValidity callback context Preloads the quaternion component cache with a specified validity duration asynchronous version qt nextQt Continues the enumeration of quaternion components started using yFirstQt qt registerTimedReportCallback callback Registers the callback function that is invoked on every periodic timed notification qt registerValueCallback callback Registers the callback function that is invoked on every change of advertised value qt set_highestValue newval Changes the recorded maximal value observed qt set_logFrequency newval Changes the datalogger recording frequency for this function qt set_logicalName newval 3 Reference Changes the logical name of the quaternion component qt set_lowestValue newval Changes the re
178. value notification frequency or OFF if timed value notifications are disabled for this function genericsensor get_resolution Returns the resolution of the measured values genericsensor get_signalBias Returns the electric signal bias for zero shift adjustment genericsensor get_signalRange Returns the electric signal range used by the sensor genericsensor get_signalUnit Returns the measuring unit of the electrical signal used by the sensor genericsensor get_signalValue Returns the measured value of the electrical signal used by the sensor genericsensor get_unit Returns the measuring unit for the measure genericsensor get_userData Returns the value of the userData attribute as previously stored using method set_userData genericsensor get_valueRange Returns the physical value range measured by the sensor genericsensor isOnline Checks if the generic sensor is currently reachable without raising any error genericsensor isOnline_async callback context Checks if the generic sensor is currently reachable without raising any error asynchronous version genericsensor load msValidity Preloads the generic sensor cache with a specified validity duration genericsensor loadCalibrationPoints rawValues refValues Retrieves error correction data points previously entered using the method calibrateFromPoints genericsensor load_async msValidity callback context Preloads the
179. value of the Volatile Organic Compound sensor no more than 6 characters voc get_currentRawValue Returns the uncalibrated unrounded raw value returned by the sensor in ppm vol as a floating point number voc get_currentValue Returns the current value of the estimated VOC concentration in ppm vol as a floating point number voc get_errorMessage Returns the error message of the latest error with the Volatile Organic Compound sensor voc get_errorType Returns the numerical error code of the latest error with the Volatile Organic Compound sensor voc get_friendlyName Returns a global identifier of the Volatile Organic Compound sensor in the format MODULE_NAME FUNCTION_NAME Cd voc get_functionDescriptor Returns a unique identifier of type YF UN_DESCR corresponding to the function voc get_functionld Returns the hardware identifier of the Volatile Organic Compound sensor without reference to the module voc get_hardwareld 3 Reference Returns the unique hardware identifier of the Volatile Organic Compound sensor in the form SERIAL FUNCTIONID voc get_highestValue Returns the maximal value observed for the estimated VOC concentration since the device was started voc get_logFrequency Returns the datalogger recording frequency for this function or OFF when measures are not stored in the data logger flash memory voc
180. ves error correction data points previously entered using the method calibrateFromPoints voc load_async msValidity callback context Preloads the Volatile Organic Compound sensor cache with a specified validity duration asynchronous version voc nextVoc Continues the enumeration of Volatile Organic Compound sensors started using yFirstVoc voc registerTimedReportCallback callback Registers the callback function that is invoked on every periodic timed notification voc registerValueCallback callback Registers the callback function that is invoked on every change of advertised value voc set_highestValue newval Changes the recorded maximal value observed 3 Reference voc set_logFrequency newval Changes the datalogger recording frequency for this function voc set_logicalName newval Changes the logical name of the Volatile Organic Compound sensor voc set_lowestValue newval Changes the recorded minimal value observed voc set_reportFrequency newval Changes the timed value notification frequency for this function voc set_resolution newval Changes the resolution of the measured physical values voc set_userData data Stores a user context provided as argument in the userData attribute of the function voc wait_async callback context Waits for all pending asynchronous commands on the module to complete and invoke the user provided callback function 3 Reference 3
181. wakeupschedule set_months newval Changes the months when a wake up must take place wakeupschedule set_userData data Stores a user context provided as argument in the userData attribute of the function 3 Reference wakeupschedule set_weekDays newval Changes the days of the week when a wake up must take place wakeupschedule wait_async callback context Waits for all pending asynchronous commands on the module to complete and invoke the user provided callback function 3 Reference 3 49 Watchdog function interface The watchog function works like a relay and can cause a brief power cut to an appliance after a preset delay to force this appliance to reset The Watchdog must be called from time to time to reset the timer and prevent the appliance reset The watchdog can be driven direcly with pulse and delayedpulse methods to switch off an appliance for a given duration In order to use the functions described here you should include lt script type text javascript src yocto_watchdog js gt lt script gt var yoctolib require yoctolib var YWatchdog yoctolib YWatchdog require_once yocto_watchdog php include yocto_watchdog h import yocto_watchdog h uses yocto_watchdog yocto_watchdog vb yocto_watchdog cs import com yoctopuce YoctoAPI Watchdog from yocto_watchdog import Global functions yFindWatchdog func Retrieves a watchdog for a given identifier yFirstWatchdog Sta
182. xide loadCalibrationPoints rawValues refValues Retrieves error correction data points previously entered using the method calibrateFromPoints carbondioxide load_async msValidity callback context Preloads the CO2 sensor cache with a specified validity duration asynchronous version carbondioxide nextCarbonDioxide Continues the enumeration of CO2 sensors started using yF irstCarbonDioxide carbondioxide registerTimedReportCallback callback Registers the callback function that is invoked on every periodic timed notification carbondioxide registerValueCallback callback Registers the callback function that is invoked on every change of advertised value carbondioxide set_highestValue newval Changes the recorded maximal value observed carbondioxide set_logFrequency newval Changes the datalogger recording frequency for this function carbondioxide set_logicalName newval 3 Reference Changes the logical name of the CO2 sensor carbondioxide set_lowestValue newval Changes the recorded minimal value observed carbondioxide set_reportFrequency newval Changes the timed value notification frequency for this function carbondioxide set_resolution newval Changes the resolution of the measured physical values carbondioxide set_userData data Stores a user context provided as argument in the userData attribute of the function carbondioxide wait_async callback context Waits fo
183. ximal value observed for the acceleration since the device was started accelerometer get_logFrequency Returns the datalogger recording frequency for this function or OFF when measures are not stored in the data logger flash memory accelerometer get_logicalName Returns the logical name of the accelerometer accelerometer get_lowestValue Returns the minimal value observed for the acceleration since the device was started accelerometer get_module Gets the YModule object for the device on which the function is located accelerometer get_module_async callback context Gets the YModule object for the device on which the function is located asynchronous version accelerometer get_recordedData startTime endTime Retrieves a DataSet object holding historical data for this sensor for a specified time interval accelerometer get_reportFrequency Returns the timed value notification frequency or OFF if timed value notifications are disabled for this function accelerometer get_resolution Returns the resolution of the measured values accelerometer get_unit Returns the measuring unit for the acceleration accelerometer get_userData Returns the value of the userData attribute as previously stored using method set_userData accelerometer get_xValue Returns the X component of the acceleration as a floating point number accelerometer get_yValue Returns the Y component of t
184. yer get_layerHeight Returns the height of the layers to draw on in pixels displaylayer get_layerWidth Returns the width of the layers to draw on in pixels displaylayer hide Hides the layer displaylayer lineTo x y Draws a line from current drawing pointer position to the specified position displaylayer moveTo x y Moves the drawing pointer of this layer to the specified position displaylayer reset Reverts the layer to its initial state fully transparent default settings displaylayer selectColorPen color Selects the pen color for all subsequent drawing functions including text drawing displaylayer selectEraser Selects an eraser instead of a pen for all subsequent drawing functions except for bitmap copy functions displaylayer selectFont fontname Selects a font to use for the next text drawing functions by providing the name of the font file displaylayer selectGrayPen graylevel Selects the pen gray level for all subsequent drawing functions including text drawing displaylayer setAntialiasingMode mode Enables or disables anti aliasing for drawing oblique lines and circles displaylayer setConsoleBackground bgcol Sets up the background color used by the clearConsol1e function and by the console scrolling feature displaylayer setConsoleMargins x1 y1 x2 y2 Sets up display margins for the consoleOut function displaylayer setConsoleWordWrap wordwrap Sets up the wrapping
185. yoctolib var YAPI yoctolib YAPI var YModule yoctolib YModule require_once yocto_api php include yocto_api h import yocto_api h uses yocto_api yocto_api vb yocto_api cs import com yoctopuce YoctoAPI YModule from yocto_api import Global functions yFindSensor func Retrieves a sensor for a given identifier yFirstSensor Starts the enumeration of sensors currently accessible YSensor methods sensor calibrateFromPoints rawValues refValues Configures error correction data points in particular to compensate for a possible perturbation of the measure caused by an enclosure sensor describe Returns a short text that describes unambiguously the instance of the sensor in the form TYPE NAME SERIAL FUNCTIONID sensor get_advertisedValue Returns the current value of the sensor no more than 6 characters sensor get_currentRawValue Returns the uncalibrated unrounded raw value returned by the sensor in the specified unit as a floating point number sensor get_currentValue Returns the current value of the measure in the specified unit as a floating point number sensor get_errorMessage Returns the error message of the latest error with the sensor sensor get_errorType Returns the numerical error code of the latest error with the sensor sensor get_friendlyName Returns a global identifier of the sensor in the format MODULE_NAME FUNCTION_NAME
Download Pdf Manuals
Related Search
Related Contents
Up Your Cash Flow Software User Manual Linksys EtherFast 10/100 USB Network Adapter Manual de seguridad DP2K-E series 取扱説明書 - ファミリー CR-250 - Circutor important wearing your afx helmet Bedienungs- und Pflegeanleitung 9 0 Copyright © All rights reserved.
Failed to retrieve file