@@ -24,10 +24,10 @@ Commander commander;
24
24
25
25
// We have to create the prototypes functions for our commands.
26
26
// The arguments has to be the same for all command functions.
27
- void cat_func ( char *args, commandResponse *response );
28
- void dog_func ( char *args, commandResponse *response );
29
- void sum_func ( char *args, commandResponse *response );
30
- void led_func ( char *args, commandResponse *response );
27
+ void cat_func ( char *args, Stream *response );
28
+ void dog_func ( char *args, Stream *response );
29
+ void sum_func ( char *args, Stream *response );
30
+ void led_func ( char *args, Stream *response );
31
31
32
32
// To tell Commander how many commands we have, it is necessary
33
33
// to create an array, that holds soma data that represents our
@@ -310,31 +310,31 @@ void loop() {
310
310
311
311
312
312
// / This is an example function for the cat command
313
- void cat_func (char *args, commandResponse *response )
313
+ void cat_func (char *args, Stream *response )
314
314
{
315
315
316
316
response -> print (" Hello from cat function!\r\n " );
317
317
318
318
}
319
319
320
320
// / This is an example function for the dog command
321
- void dog_func (char *args, commandResponse *response )
321
+ void dog_func (char *args, Stream *response )
322
322
{
323
323
324
324
response -> print (" Hello from dog function!\r\n " );
325
325
326
326
}
327
327
328
328
// / This is an example function for the led command
329
- void led_func (char *args, commandResponse *response )
329
+ void led_func (char *args, Stream *response )
330
330
{
331
331
332
332
digitalWrite ( LED_PIN, !digitalRead ( LED_PIN ) );
333
333
334
334
}
335
335
336
336
// / This is an example function for the sum command
337
- void sum_func (char *args, commandResponse *response )
337
+ void sum_func (char *args, Stream *response )
338
338
{
339
339
340
340
// These variables will hold the value of the
0 commit comments