diff --git a/boards/default_src/micropython/blocks/sensor_extern.js b/boards/default_src/micropython/blocks/sensor_extern.js index 881c9c7d..ec72a4ef 100644 --- a/boards/default_src/micropython/blocks/sensor_extern.js +++ b/boards/default_src/micropython/blocks/sensor_extern.js @@ -347,8 +347,10 @@ export const sensor_use_i2c_init = { ["ADXL345", "ADXL345"], ["LTR308", "LTR308"], ["LTR381RGB", "LTR381RGB"], + ["UCS12071","UCS12071"], ["LTR390UV","LTR390UV"], ["HP203X", "HP203X"], + ["SPL06_001","SPL06_001"], ["SHTC3", "SHTC3"], ["AHT21", "AHT21"], ["VL53L0X", "VL53L0X"], diff --git a/boards/default_src/micropython/generators/sensor_extern.js b/boards/default_src/micropython/generators/sensor_extern.js index 40e00d0a..137e26ff 100644 --- a/boards/default_src/micropython/generators/sensor_extern.js +++ b/boards/default_src/micropython/generators/sensor_extern.js @@ -179,12 +179,18 @@ export const sensor_use_i2c_init = function (_, generator) { } else if (key == 'LTR381RGB') { generator.definitions_['import_ltr381rgb'] = 'import ltr381rgb'; code = v + ' = ltr381rgb.LTR_381RGB(' + iv + ')\n'; - }else if (key == 'LTR390UV'){ + } else if(key == 'UCS12071'){ + generator.definitions_['import_ucs12071'] = 'import ucs12071'; + ode = v + ' = ucs12071.UCS1207(' + iv + ')\n'; + } else if (key == 'LTR390UV'){ generator.definitions_['import_ltr390uv'] = 'import ltr390uv'; code = v + ' = ltr390uv.ALS_UVS(' + iv +')\n'; } else if (key == 'HP203X') { generator.definitions_['import_hp203x'] = 'import hp203x'; code = v + ' = hp203x.HP203X(' + iv + ')\n'; + } else if(key == "SPL06_001"){ + generator.definitions_['import_spl06_001'] = 'import spl06_001'; + code = v + ' = spl06_001.SPL06(' + iv + ')\n'; } else if (key == 'SHTC3') { generator.definitions_['import_shtc3'] = 'import shtc3'; code = v + ' = shtc3.' + key + "(" + iv + ')\n';