Over Serial Configuration - Sketch 2.1: Difference between revisions

From lechacal
Jump to navigation Jump to search
Line 33: Line 33:
!parameters value/range
!parameters value/range
!Example
!Example
!Slave 4
|-
|-
| x
| x
| Enter/exit interactive mode.  
| Enter/exit interactive mode.  
| None
| None
|  
| x
|
|-
|-
|print
|print
|Prints entire configuration
|Prints entire configuration
|None
|None
|
|print
|-
|-
|polling <interval>
|polling <interval>
Line 55: Line 53:
|<f> is 0 or 1.<br>0: CSV.<br> 1: Emoncms
|<f> is 0 or 1.<br>0: CSV.<br> 1: Emoncms
|format 0
|format 0
|-
|id <nodeid>
|For Emoncms format only. Modify the Emoncms node ID.
|<nodeid> in the range 0 to 255.
|id 11
|-
|vcal <vcal>
|Modify the voltage calibration coefficient.
|<vcal> can be any floating point number.
|vcal 548.0
|-
|ical <ical>
|Modify the current calibration coefficient.
|<ical> can be any floating point number.
|ical 83.33
|-
|-
|}
|}

Revision as of 15:51, 18 November 2016

This article is for sketch RPICT7V1 version 2.1.
Note a web interface page will be develop in a close future.

Preliminaries

To configure the RPIct7V1 (version 2) over serial a serial terminal tool is required. We recommend using simple Linux terminal command (stty, cat, echo).

Two terminal windows will be opened (ssh, putty etc...). One for reading the other for sending commands.

On the first terminal configure the serial like so:

stty -F /dev/ttyS0 raw speed 38400

Then start reading the data from the rpict board:

$ cat /dev/ttyS0

On the second terminal command can be sent to the serial port using the echo command. For example:

$ echo "a_command" > /dev/ttyS0

This will send the command a_command to the serial port.

As the RPICT7V1 continuously send current/power/voltage data at regular intervals we need to interrupt the board. The "x" command is used for this. This will instruct the rpict7v1 to stop sending data and listen for commands. We will call this the interactive mode.

$ echo "x" > /dev/ttyS0

Command list

The table below shows all available commands.

Jumpers Configuration
Command Description parameters value/range Example
x Enter/exit interactive mode. None x
print Prints entire configuration None print
polling <interval> Change the polling interval. <interval> in seconds in the range 0 to 255. polling 5
format <f> Modify the output format. <f> is 0 or 1.
0: CSV.
1: Emoncms
format 0
id <nodeid> For Emoncms format only. Modify the Emoncms node ID. <nodeid> in the range 0 to 255. id 11
vcal <vcal> Modify the voltage calibration coefficient. <vcal> can be any floating point number. vcal 548.0
ical <ical> Modify the current calibration coefficient. <ical> can be any floating point number. ical 83.33