Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • complete the Pico Engine Quickstart
  • have a ruleset the hello_world ruleset from the Quickstart registered in the pico-engine, and installed in a pico
  • have installed the event console in Google Chrome

...

Next, learn about persistence, the "P" of pico, by working through Lesson 2. Pico State.

Exercises

Do the following:

  1. Create a new channel (pick any name and type you like). 
  2. Send an event to your pico using the new channel. 
  3. Do you get the same result? Why or why not? 
  4. Delete the channel.
  5. Resend the event using the deleted channel. What happens? Why?
  6. Send the event ecco/hello to your pico. What do you observe? Why? 
  7. Add a new rule that selects on echo/monkey and responds with "Hello Monkey" unless an event attribute named name is given, in which case it will respond with "Hello " followed by the given name. Hint: use the .defaultsTo() operator.
  8. Repeat the previous exercise using the ternary conditional instead of the .defaultsTo() operator.