User Tools

Site Tools


en:arduino_module_base_lesson

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
en:arduino_module_base_lesson [2020/01/20 16:24]
golikov
en:arduino_module_base_lesson [2020/03/25 16:28] (current)
Line 246: Line 246:
         case 0x02:{         case 0x02:{
         String data = String(Sensor_data());​ // Store readings obtained from Sensor_data() in the data variable         String data = String(Sensor_data());​ // Store readings obtained from Sensor_data() in the data variable
-        bus.sendMessage(bus.obcAddress,​ 0, data); // передаем содержимое переменной ​data на БКУ+        bus.sendMessage(bus.obcAddress,​ 0, data); // пSend the contents of the data variable to the OCC
         break;         break;
       }       }
Line 254: Line 254:
    
 uint16_t Sensor_data(void){ uint16_t Sensor_data(void){
-  uint16_t data = analogRead(data_pin);​ //Считываем показания освещенности с датчика+  uint16_t data = analogRead(data_pin);​ //Read illuminance values from the sensor
   return data;   return data;
 } }
    
 /* /*
- ​* ​Следующий блок кода необходимо всегда добавлять в конец программы + ​* ​The following block of code must always be appended to the program. 
- ​* ​Функция вызывается автоматически и необходима для обработки сообщения+ ​* ​The function is called automatically and is necessary for message processing.
 */  */ 
 void serialEvent2() { void serialEvent2() {
en/arduino_module_base_lesson.txt · Last modified: 2020/03/25 16:28 (external edit)