Webserver only w/o any other functions, single thread. Running on STM32F013+W5500

Dependencies:   NTPClient W5500Interface Watchdog device_configuration eeprom_flash mbed-rpc-nucleo mbed-rtos mbed

Fork of F103-Serial-to-Ethernet by Chau Vo

protocol_rpc.txt

Committer:
olympux
Date:
2014-12-29
Revision:
27:22f289beceb8
Child:
35:f5c98e2d6aad

File content as of revision 27:22f289beceb8:

NNIO module can be controlled through TCP/UDP using RPC commands.


1. Connections
  + UDP port: 11000
  + TCP port: 10000 (NNIO module is TCP server)

2. Digital inputs
  + Digital inputs: din0 - din7
  + Commands: /din0/read x
    
3. Digital outputs
  + Digital outputs: dout0 - dout7
  + Commands:
    /dout0/read x
    /dout0/write 1

3. Analog inputs
  + Analog inputs: ain0 - ain1
  + Commands:
    /ain0/read x: returns a value between 0 to 1
    /ain0/read_u16 x: returns a value between 0 to 0xFFFF

4. PWM outputs:
  + PWM outputs: pwm0 - pwm1
  + Commands:
    /pwm/period 0.5: Set the PWM period, specified in seconds (float), keeping the duty cycle the same.
    /pwm/period_ms 500: Set the PWM period, specified in milli-seconds (int), keeping the duty cycle the same.
    /pwm/pulsewidth 1: Set the PWM pulsewidth, specified in seconds (float), keeping the period the same.
    /pwm/pulsewidth_ms 1000: Set the PWM pulsewidth, specified in milli-seconds (int), keeping the period the same.
    /pwm/read x: Return the current output duty-cycle setting, measured as a percentage (float).
    /pwm/write 0.6: Set the ouput duty-cycle, specified as a percentage (float).

5. Timers:
  + Timer: timer1
  + Commands:
    /timer1/start x
    /timer1/stop x
    /timer1/reset x
    /timer1/read x: returns float, between 0 to 1.
    /timer1/read_ms
    /timer1/read_us

6. UARTs:
  + Uart: uart
  + Commands:
    /uart/baud 9600
    /uart/putc 60: send ASCII code, '<'
    /uart/getc x: return ASCII code
    /uart/puts helloworld: print helloworld to serial port