initial clean commit
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
use Menking\Meshcore\Environment;
|
||||
use Menking\Meshcore\Meshcore;
|
||||
|
||||
require(__DIR__ . '/../vendor/autoload.php');
|
||||
|
||||
if( !isset($argv[1]) ) die("{$argv[0]} <port>\n");
|
||||
|
||||
Environment::configure($argv[1]);
|
||||
|
||||
$mc = Meshcore::getInstance();
|
||||
|
||||
$resp = $mc->appStart("battery storage");
|
||||
|
||||
$resp = $mc->getBatteryAndStorage();
|
||||
|
||||
echo "Battery voltage: " . $resp->battery_millivolt . " mV\n";
|
||||
echo "Storage used: " . $resp->storage_used . " kB\n";
|
||||
echo "Storage total: " . $resp->storage_total . " kB\n";
|
||||
|
||||
Reference in New Issue
Block a user