MakeBlock Drive Updated Updated library for MakeBlock Ranger

Loading...
Searching...
No Matches
MeColorSensor.cpp File Reference

Driver for MeColorSensor module. More...

`#include "MeColorSensor.h"`
Include dependency graph for MeColorSensor.cpp:

## Detailed Description

Driver for MeColorSensor module.

Author
  MakeBlock

Version
  V1.0.4

Date
  2017/01/17

Copyright
  This software is Copyright (C), 2012-2017, MakeBlock. Use is subject to license
  conditions. The main licensing options available are GPL V2 or Commercial:

Open Source Licensing +GPL V2
  This is the appropriate option if you want to share the source code of your
  application with everyone you distribute it to, and you also want to give them
  the right to share who uses it. If you wish to use this software under Open
  Source Licensing, you must contribute all your source code to the open source
  community in accordance with the GPL Version 2 when your application is
  distributed. See http://www.gnu.org/copyleft/gpl.html

Description
  This file is a drive for MeColorSensor module, It supports MeColorSensor V1.0 device provided by MakeBlock.

Method List:

1. void MeColorSensor::SensorInit(void)
2. uint8_t MeColorSensor::ReportId(void)
3. void MeColorSensor::ColorDataRead(void)
4. void MeColorSensor::TurnOnLight(void)
5. void MeColorSensor::TurnOffLight(void)
6. uint16_t MeColorSensor::ReturnRedData(void)
7. uint16_t MeColorSensor::ReturnGreenData(void)
8. uint16_t MeColorSensor::ReturnBlueData(void)
9. uint16_t MeColorSensor::ReturnColorData(void)
10. long MeColorSensor::ColorIdentify(void)
11. long MeColorSensor::ReturnColorCode(void)
12. uint16_t MeColorSensor::calculateColorTemperature(void)
13. uint16_t MeColorSensor::calculateLux(void)
14. int8_t MeColorSensor::writeReg(int16_t reg, uint8_t data)
15. int8_t MeColorSensor::readData(uint8_t start, uint8_t *buffer, uint8_t size)
16. int8_t MeColorSensor::writeData(uint8_t start, const uint8_t *pData, uint8_t size);
17. uint8_t MeColorSensor::Returnresult(void);
18. uint8_t MeColorSensor::ReturnGrayscale(void);
19. uint16_t MeColorSensor::ReturnColorhue(void);
20. uint8_t MeColorSensor::MAX(uint8_t r,uint8_t g,uint8_t b);
21. uint8_t MeColorSensor::MIN(uint8_t r,uint8_t g,uint8_t b);
22. void MeColorSensor::TurnOffmodule(void);
23. void MeColorSensor::TurnOnmodule(void);
24. uint8_t MeColorSensor::ColorDataReadOnebyOne();

History:

      `<Author>`         `<Time>`        `<Version>`        `<Descr>`
       zzipeng         2017/01/17          1.0.0         complete the driver code.
       zzipeng         2017/04/03          1.0.1         only detect six colors.
       zzipeng         2017/04/10          1.0.2         only detect seven colors and add methods named MeColorSensor::TurnOffmodule(void),MeColorSensor::TurnOnmodule.
       zzipeng         2017/04/20          1.0.3         add methods MeColorSensor::ColorDataReadOnebyOne();
       Lanweiting      2017/06/23          1.0.4         Canonical the code format.