Warning
This page is located in archive. Go to the latest version of this course pages.

Covid HW 08 - Display and files

Expected results:

  • main.c file for NUCLEO with following functionality:
    • The program in NUCLEO will be able to draw primitives from a file stored on the computer.
    • The NUCLEO will implement handler for test commands.
  • chw8.c file for PC where
    • The program expects a file name given on the command line
    • The program opens the file and send the content of this file line by line to NUCLEO.
    • When JOY_DOWN is received, the program sends the “DRAW:CLEAR 9” message to NUCLEO.
    • When computer receives JOY_SEL, the commands from the file are sent to the NUCLEO again.

The NUCLEO will interact with your C program and this program expects a file name to be given on the command line. The sample of this file is as follows:

*IDN?
DRAW:*IDN?
DRAW:CLEAR 2
DRAW:SETTEXTCOLOR 3 
DRAW:CIRCLE 49,20
DRAW:CIRCLE 79,20,10
DRAW:SETTEXTCOLOR 2 
DRAW:LINE 55,40,60,45 
DRAW:LINE 68,45,73,40 
DRAW:LINE 60,45,68,45 
DRAW:SETFONT 12
DRAW:TEXT 64,120,Nucleo RULEZ!,1
The desctiption of these commands is available in lab10.

All handlers for single commands should be implemented. When command is not recognized by NUCLEO return “Wrong command\r\n” and the C program

courses/be5b99cpl/hw/hw08c.txt · Last modified: 2020/12/02 17:04 by pacesp