Merge pull request #214 from sensebox/codegenerator/fix-co2-zeros
fix co2 zero issue
This commit is contained in:
		
						commit
						f6e5d086b5
					
				| @ -429,11 +429,12 @@ Blockly.Arduino.sensebox_scd30 = function () { | |||||||
|     "#include <SparkFun_SCD30_Arduino_Library.h> // http://librarymanager/All#SparkFun_SCD30_Arduino_Library"; |     "#include <SparkFun_SCD30_Arduino_Library.h> // http://librarymanager/All#SparkFun_SCD30_Arduino_Library"; | ||||||
|   Blockly.Arduino.definitions_["SCD30"] = "SCD30 airSensor;"; |   Blockly.Arduino.definitions_["SCD30"] = "SCD30 airSensor;"; | ||||||
|   Blockly.Arduino.setupCode_["init_scd30"] = ` Wire.begin();
 |   Blockly.Arduino.setupCode_["init_scd30"] = ` Wire.begin();
 | ||||||
|   if (airSensor.begin() == false) | if (airSensor.begin() == false) | ||||||
|   { | { | ||||||
|   while (1) |   while (1) | ||||||
|     ; |     ; | ||||||
|   }`;
 | }`;
 | ||||||
|  |   Blockly.Arduino.setupCode_["scd30_staleData"] = "airSensor.useStaleData(true);"; | ||||||
|   var code = ""; |   var code = ""; | ||||||
|   switch (dropdown) { |   switch (dropdown) { | ||||||
|     case "temperature": |     case "temperature": | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user