Difference: Session4 (1 vs. 2)

Revision 22019-05-23 - UliRaich

Line: 1 to 1
 
META TOPICPARENT name="WorkshopExercises"

Exercise 1:

Added:
>
>
Go through the tutorial on

https://mydevices.com/cayenne/docs/cayenne-mqtt-api/#cayenne-mqtt-api-manually-publishing-subscribing

in section "Manually Publishing / Subscribing"

  • Create a connection profile with your Cayenne credentials
  • Connect to Cayenne (you should see the note "offline" go away)
  • Send some dummy temperature measurements to Cayenne
  • Read the push button and send the answer that you successfully received and treated the command

Exercise 2:

 Come back to exercise 7 of session 2, where we read out the temperature and relative humidity values from the SHT30 shield.

Now replace the dummy data, in exercise 5 of session 3 with the real data and send them to Cayenne. Instead of sending voltages, send temperature and relative humidity. This exercise therefore combines the 2 previous exercises into a new one.

Line: 9 to 20
 Observe the values on Cayenne. Create a gauge for the temperature.

Measure for some minutes and then have a look the widget history.

Changed:
<
<

Exercise 2:

>
>

Exercise 3:

  Connect the push button to the built-in led. Write a callback function which parses the topic and payload, finds out if the command is meant for the LED (check the channel number) from the topic. Extract the value from the payload and interact with the LED correspondingly.

The response is sent to Cayenne by the Cayenne client without your intervention.

Changed:
<
<

Exercise 3:

>
>

Exercise 4:

  Create 3 sliders on Cayenne for each colour component of the WS2812 rgb LED. Find out from the channel transmitted in the topic, which colour component must be acted upon. Set the corresponding LED to the value (0 .. 255) found in the payload.

Revision 12019-05-15 - UliRaich

Line: 1 to 1
Added:
>
>
META TOPICPARENT name="WorkshopExercises"

Exercise 1:

Come back to exercise 7 of session 2, where we read out the temperature and relative humidity values from the SHT30 shield.

Now replace the dummy data, in exercise 5 of session 3 with the real data and send them to Cayenne. Instead of sending voltages, send temperature and relative humidity. This exercise therefore combines the 2 previous exercises into a new one.

Observe the values on Cayenne. Create a gauge for the temperature.

Measure for some minutes and then have a look the widget history.

Exercise 2:

Connect the push button to the built-in led. Write a callback function which parses the topic and payload, finds out if the command is meant for the LED (check the channel number) from the topic. Extract the value from the payload and interact with the LED correspondingly.

The response is sent to Cayenne by the Cayenne client without your intervention.

Exercise 3:

Create 3 sliders on Cayenne for each colour component of the WS2812 rgb LED. Find out from the channel transmitted in the topic, which colour component must be acted upon. Set the corresponding LED to the value (0 .. 255) found in the payload.

-- Uli Raich - 2019-05-15

Comments

<--/commentPlugin-->
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback