Lecture Slides

Week 2 IoT Lecture.ppt

week 2 exam questions.pdf

Lab files

static void print_float(float number){
    int integer_part = (int)number;
    int decimal_part = (int)((number - integer_part) * 1000); // Get the two decimal places
    printf("Random number: %d.%02d\\n", integer_part, decimal_part);
}

PROCESS_THREAD(hello_world_process, ev, data)
{
  PROCESS_BEGIN();
  int i;    
  random_init(2);
  for (i = 0; i < 10; i++) {
    int random_integer = random_rand() % (MAX_RANDOM + 1);
    float random_float = random_integer / 1000.0;
    print_float(random_float);
  }
  printf("Hello, world\\n");
  PROCESS_END();
}

Wireless Sensors and Actuators Networks (WSN’s)

Types of Application

We can plan for the sensors to solve for certain applications.

  1. Event detection
    1. Reporting abnormalities and changes
    2. Reporting occurrences of the events
  2. Periodic measurements
    1. e.g., counting people entering through a door
    2. Measure and report the observation and measurement data