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
protocol_rpc.txt@36:dc6f079777bb, 2016-06-13 (annotated)
- Committer:
- olympux
- Date:
- Mon Jun 13 13:46:22 2016 +0000
- Revision:
- 36:dc6f079777bb
- Parent:
- 35:f5c98e2d6aad
- Child:
- 38:f8735ae519aa
v2.0.0; Updated latest libraries
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
olympux | 27:22f289beceb8 | 1 | NNIO module can be controlled through TCP/UDP using RPC commands. |
olympux | 27:22f289beceb8 | 2 | |
olympux | 27:22f289beceb8 | 3 | |
olympux | 27:22f289beceb8 | 4 | 1. Connections |
olympux | 27:22f289beceb8 | 5 | + UDP port: 11000 |
olympux | 27:22f289beceb8 | 6 | + TCP port: 10000 (NNIO module is TCP server) |
olympux | 27:22f289beceb8 | 7 | |
olympux | 27:22f289beceb8 | 8 | 2. Digital inputs |
olympux | 35:f5c98e2d6aad | 9 | + Digital inputs: di0 - di7 |
olympux | 35:f5c98e2d6aad | 10 | + Commands: /di0/read x |
olympux | 27:22f289beceb8 | 11 | |
olympux | 27:22f289beceb8 | 12 | 3. Digital outputs |
olympux | 35:f5c98e2d6aad | 13 | + Digital outputs: do0 - do7 |
olympux | 27:22f289beceb8 | 14 | + Commands: |
olympux | 35:f5c98e2d6aad | 15 | /do0/read x |
olympux | 35:f5c98e2d6aad | 16 | /do0/write 1 |
olympux | 27:22f289beceb8 | 17 | |
olympux | 27:22f289beceb8 | 18 | 3. Analog inputs |
olympux | 35:f5c98e2d6aad | 19 | + Analog inputs: ai0 - ai1 |
olympux | 27:22f289beceb8 | 20 | + Commands: |
olympux | 35:f5c98e2d6aad | 21 | /ai0/read x: returns a value between 0 to 1 |
olympux | 35:f5c98e2d6aad | 22 | /ai0/read_u16 x: returns a value between 0 to 0xFFFF |
olympux | 27:22f289beceb8 | 23 | |
olympux | 27:22f289beceb8 | 24 | 4. PWM outputs: |
olympux | 27:22f289beceb8 | 25 | + PWM outputs: pwm0 - pwm1 |
olympux | 27:22f289beceb8 | 26 | + Commands: |
olympux | 27:22f289beceb8 | 27 | /pwm/period 0.5: Set the PWM period, specified in seconds (float), keeping the duty cycle the same. |
olympux | 27:22f289beceb8 | 28 | /pwm/period_ms 500: Set the PWM period, specified in milli-seconds (int), keeping the duty cycle the same. |
olympux | 27:22f289beceb8 | 29 | /pwm/pulsewidth 1: Set the PWM pulsewidth, specified in seconds (float), keeping the period the same. |
olympux | 27:22f289beceb8 | 30 | /pwm/pulsewidth_ms 1000: Set the PWM pulsewidth, specified in milli-seconds (int), keeping the period the same. |
olympux | 27:22f289beceb8 | 31 | /pwm/read x: Return the current output duty-cycle setting, measured as a percentage (float). |
olympux | 27:22f289beceb8 | 32 | /pwm/write 0.6: Set the ouput duty-cycle, specified as a percentage (float). |
olympux | 27:22f289beceb8 | 33 | |
olympux | 27:22f289beceb8 | 34 | 5. Timers: |
olympux | 27:22f289beceb8 | 35 | + Timer: timer1 |
olympux | 27:22f289beceb8 | 36 | + Commands: |
olympux | 35:f5c98e2d6aad | 37 | /tmr1/start x |
olympux | 35:f5c98e2d6aad | 38 | /tmr1/stop x |
olympux | 35:f5c98e2d6aad | 39 | /tmr1/reset x |
olympux | 35:f5c98e2d6aad | 40 | /tmr1/read x: returns float, between 0 to 1. |
olympux | 35:f5c98e2d6aad | 41 | /tmr1/read_ms |
olympux | 35:f5c98e2d6aad | 42 | /tmr1/read_us |
olympux | 27:22f289beceb8 | 43 | |
olympux | 27:22f289beceb8 | 44 | 6. UARTs: |
olympux | 27:22f289beceb8 | 45 | + Uart: uart |
olympux | 27:22f289beceb8 | 46 | + Commands: |
olympux | 27:22f289beceb8 | 47 | /uart/baud 9600 |
olympux | 27:22f289beceb8 | 48 | /uart/putc 60: send ASCII code, '<' |
olympux | 27:22f289beceb8 | 49 | /uart/getc x: return ASCII code |
olympux | 27:22f289beceb8 | 50 | /uart/puts helloworld: print helloworld to serial port |