Problem with "An IoT Application with BBG & BBG Start Kit"

Hi, am trying to build this “An IoT Application with BBG & BBG Start Kit” – … ef=product

I am getting a traceback in module … the line “from logo import print_seedstudio” gives ImportError: No module named logo.

Where do I find it and how do I install it ? Or is it a leftover from some other hardware build ?



Ok, if I simply comment that “from logo …” statement out, I get a bit of life … but the temperature is way off (10.2C vs 22.3C) so I guess the maths is off somewhere … anyone know the right numbers ??

This is the python code

[code]def read_temperature(model = ‘v1.2’):
“Read temperature values in Celsius from Grove Temperature Sensor”
# each of the sensor revisions use different thermistors, each with their own B value constant
if model == ‘v1.2’:
bValue = 4299 # sensor v1.2 uses thermistor ??? (assuming NCP18WF104F03RC until SeeedStudio clarifies)
elif model == ‘v1.1’:
bValue = 4250 # sensor v1.1 uses thermistor NCP18WF104F03RC
bValue = 3975 # sensor v1.0 uses thermistor TTC3A103*39H

total_value = 0
for index in range(20):
    sensor_value = adc.read_adc()
    total_value += sensor_value
average_value = float(total_value / 20)

sensor_value_tmp = (float)(average_value / 3.214)

resistance = (float)(1023 - sensor_value_tmp) * 10000 / sensor_value_tmp
temperature = round((float)(1 / (math.log(resistance / 10000) / bValue + 1 / 298.15) - 273.15), 2)
return temperature



This issue occurs due to I2C address conflict for Grove I2C ADC module please refer the following forum post where this issue is resolved by changing the address to 0x50.

Thanks and Regards

Thanks. Actually I think it is working on the original address.

I fooled around with the 3.214 value below (trial and error)

[code]sensor_value_tmp = (float)(average_value / 3.214)


And the temperature displayed now tracks fairly accurately as far as I can tell.

Still don’t understand the “from logo import …” statement !


You need not make any changes to the code.Please change the I2C address of the Grove I2CADC module and comment the logo statement.