Skip to content

Commit 16d71fa

Browse files
committed
Extract from mruby-esp32/mruby-esp32 repository
1 parent 75c0374 commit 16d71fa

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed

README.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
mruby-esp32-system
2+
============
3+
4+
System library for mruby-esp32.
5+
6+
## Installation
7+
Add the line below to your `build_config.rb`:
8+
9+
```ruby
10+
conf.gem :github => 'mruby-esp32/mruby-esp32-system'
11+
```
12+
13+
## Example
14+
```ruby
15+
ver = ESP32::System.sdk_version
16+
puts "SDK Version: #{ver}"
17+
18+
mem = ESP32::System.available_memory / 1000
19+
puts "Memory free: #{mem}K"
20+
21+
puts "Delaying 10 seconds"
22+
ESP32::System.delay(10 * 1000)
23+
24+
#ESP32::System.restart()
25+
26+
puts "Deep sleeping for 10 seconds"
27+
ESP32::System.deep_sleep_for(10 * 1000000)
28+
```
29+
30+
## License
31+
32+
Copyright (c) 2016 Carson McDonald
33+
34+
Permission is hereby granted, free of charge, to any person obtaining a
35+
copy of this software and associated documentation files (the "Software"),
36+
to deal in the Software without restriction, including without limitation
37+
the rights to use, copy, modify, merge, publish, distribute, sublicense,
38+
and/or sell copies of the Software, and to permit persons to whom the
39+
Software is furnished to do so, subject to the following conditions:
40+
41+
The above copyright notice and this permission notice shall be included in
42+
all copies or substantial portions of the Software.
43+
44+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
45+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
46+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
47+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
48+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
49+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
50+
DEALINGS IN THE SOFTWARE.

0 commit comments

Comments
 (0)