5. Programming, general conceptsThe Yoctopuce API was designed to be at the same time simple to use and sufficiently generic forthe concepts used to be valid for all the modules in the Yoctopuce range, and this in all the availableprogramming languages. Therefore, when you have understood how to drive your Yocto-GPS withyour favorite programming language, learning to use another module, even with a different language,will most likely take you only a minimum of time.5.1. Programming paradigmThe Yoctopuce API is object oriented. However, for simplicity's sake, only the basics of objectprogramming were used. Even if you are not familiar with object programming, it is unlikely that thiswill be a hinderance for using Yoctopuce products. Note that you will never need to allocate ordeallocate an object linked to the Yoctopuce API: it is automatically managed.There is one class per Yoctopuce function type. The name of these classes always starts with a Yfollowed by the name of the function, for example YTemperature, YRelay, YPressure, etc.. There isalso a YModule class, dedicated to managing the modules themselves, and finally there is the staticYAPI class, that supervises the global workings of the API and manages low level communications.Structure of the Yoctopuce API.The YSensor classEach Yoctopuce sensor function has its dedicated class: YTemperature to measure the temperature,YVoltage to measure a voltage, YRelay to drive a relay, etc. However there is a special class thatcan do more: YSensor.www.yoctopuce.com 17