Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
Added: | ||||||||
> > |
Exercises for session 3: MQTT and CayenneExercise 1:Install mosquitto on your machine. On Ubuntu Linux this can very easily be accomplished with apt. On Windows it is almost as easy. For details see http://www.steves-internet-guide.com/install-mosquitto-broker/![]()
Exercise 2:Write you own MQTT client in Python publishing a message to “AFNOG19” every 2 s. Have a look at the umqtt.simple class![]() Exercise 3:Register a user on https://mydevices.com/cayenne/signup![]() Exercise 4:Write a program connecting to Cayenne. Observe that the dashboard is coming up.Exercise 5:Write a program that sends a dummy voltage value to Cayenne on channel 0. The voltage values should range from 0 to 3300 mV (the voltages on the ESP8266). Wait for 2 s minimum between each value. Observe the widget coming up on the dashboard. Fix the widget on the dashboard and change the widget parameters (e.g. the name).Exercise 6:Add a gauge widget with ranges 0 .. 1V, 1V .. 2V, 2V .. 3.3V. Run your program sending the dummy voltages and observe how the dashboard displays them.Exercise 7:Add a dummy measurement on atmospheric pressure to your program. The normal air pressure is around 950 hPa (hecto Pascal).Exercises 8:Create a slider and a push button on your dashboard. --![]() Comments |