1. C warmup [1]

  • Does C have a “goes to” operator?

  • What, exactly, is printed when this code is executed?

  • How does this code actually work?

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
#include <stdio.h>

int main()
{
    int x = 5;

    // While x goes to zero.
    while (x --> 0) {
        printf("%d ", x);
    }
}

What does the following code print?

1
2
3
4
5
#include <stdio.h>

int main() {
    puts("-0.5" + 1);
}

The reason for the result is not necessarily your first guess!

What does it even mean to add an integer to a string in C??

2. SMART Response XE distribution

Everyone gets a copy of the programming adapter and supplies.

  • Find some SRXE units that don’t have much battery corrosion.

  • Check one out!

  • Figure out how to reprogram and run TinyBASIC Plus on the SRXE.

The ATmega128RFA1 on the SRXE is not 5 V compatible!

How, then can you program the unit with your Arduino-as-ISP ?

  • Step 1 is always read the datasheet.

3. Plans

  • RTOS

  • SRXE hardware

  • Power measurement

4. Homework

Due by start of class Wednesday.

Read RTOS - Introduction and the zyBook path to a task scheduler. This is/was Chapter 8. Task Scheduler from ECE 322 — you should have a local copy of this book, as strongly recommended to do so from last semester.


1. Post-break trolling.