Commit 7ef2378d authored by reza's avatar reza

Update README.md

parent 303bb09d
......@@ -41,7 +41,7 @@ After that type in the `Connect` method
myAwsomeHolyShitImDyingForThisDevice.Connect()
```
This methode also return a boolian "True/False" to indicate whether the device is successfully connected to the PC or not.
This method also return a boolian "True/False" to indicate whether the device is successfully connected to the PC or not.
If device is successfully connected to the PC, you can use the following methods and properties to retrieve Device information, or send a command/ recieve data to/from the device:
```
......@@ -55,9 +55,37 @@ If device is successfully connected to the PC, you can use the following methods
myAwsomeHolyShitImDyingForThisDevice.getData()
```
#### Get Info
If you call this methode without any input or with input `all`, it will return a dict with this structure:
### Methodes
#### getInfo()
If you call this method without any input or with input `all`, it will return a dict with this structure:
{'name':String, 'version':String, 'id':String, 'flash':String}
Or you can just call this method with one above keys, so it will return just an string.
```
myAwsomeHolyShitImDyingForThisDevice.getInfo('version')
```
#### getStatus()
If you call this method without any input or with input `all`, it will return a dict with this structure:
{'mode':Bool, 'cnt':Int, 'buff_len':Int}
Or you can just call this method with one above keys.
```
myAwsomeHolyShitImDyingForThisDevice.getStatus('cnt')
```
mode: If 'True' indicates that "device is busy (in gathering mode)". If false indicates that "device is idle (not in gathering mode)".
cnt: Number of all sample that device send to pc since calling last `start` method.
buff_len: Number of samples that are stored in buffer but not been read yet.
#### start()
Right after calling this method, the device will go in 'gathering mode' and start to acquire data.
#### stop()
Right after calling this method, the device will stop acquiring data.
#### getData()
This method gives you an amount of "gathered samples" depend on where and when you call it.
If you call this method with no input in the middle of data gathering, it will return all of buffer
and if buffer is empty it will wait untill at least one sample arrives.
## Built With
* [C# dll .net](https://docs.microsoft.com/en-us/dotnet/api/system.io.ports.serialport.pinchanged?view=netframework-4.8)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment