update code for new lightsensor
need to use Board Support Package V1.4.0 with MCU Lib V1.4.0
This commit is contained in:
		
							parent
							
								
									5e4021d6d9
								
							
						
					
					
						commit
						6d7e2782d6
					
				| @ -28,15 +28,23 @@ Blockly.Arduino.sensebox_sensor_uv_light = function () { | |||||||
|     Blockly.Arduino.setupCode_['sensebox_sensor_uv_light'] = 'veml.begin();' |     Blockly.Arduino.setupCode_['sensebox_sensor_uv_light'] = 'veml.begin();' | ||||||
|     code = 'veml.get' + dropdown_name + '()'; |     code = 'veml.get' + dropdown_name + '()'; | ||||||
|   } |   } | ||||||
|  |   // if (dropdown_name === 'Illuminance') {
 | ||||||
|  |   //   Blockly.Arduino.definitions_['define_tsl'] = 'TSL45315 tsl;'
 | ||||||
|  |   //   Blockly.Arduino.setupCode_['sensebox_sensor_illuminance'] = 'tsl.begin();'
 | ||||||
|  |   //   code = 'tsl.get' + dropdown_name + '()';
 | ||||||
|  |   // }
 | ||||||
|   if (dropdown_name === 'Illuminance') { |   if (dropdown_name === 'Illuminance') { | ||||||
|     Blockly.Arduino.definitions_['define_tsl'] = 'TSL45315 tsl;' |     Blockly.Arduino.definitions_['define_lightsensor'] = 'Lightsensor lightsensor;' | ||||||
|     Blockly.Arduino.setupCode_['sensebox_sensor_illuminance'] = 'tsl.begin();' |     Blockly.Arduino.setupCode_['sensebox_sensor_illuminance'] = 'lightsensor.begin();' | ||||||
|     code = 'tsl.get' + dropdown_name + '()'; |     code = 'lightsensor.get' + dropdown_name + '()'; | ||||||
|   } |   } | ||||||
|  | 
 | ||||||
|   return [code, Blockly.Arduino.ORDER_ATOMIC]; |   return [code, Blockly.Arduino.ORDER_ATOMIC]; | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
| /** | /** | ||||||
|  * BMX055 Accelerometer |  * BMX055 Accelerometer | ||||||
|  *  |  *  | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user