fin
This commit is contained in:
16
src/main.rs
16
src/main.rs
@@ -1,15 +1,15 @@
|
||||
use std::path::Path;
|
||||
use crate::curl::startup;
|
||||
|
||||
mod json;
|
||||
mod curl;
|
||||
mod serial;
|
||||
|
||||
fn main() {
|
||||
let data_file = Path::new("data.json");
|
||||
fn main() {
|
||||
let data_file = std::path::Path::new("data.json");
|
||||
let data = json::get_json(data_file);
|
||||
// some loop for getting data from arduino
|
||||
|
||||
// send curl request
|
||||
let res = curl::request(data);
|
||||
println!("Response code: {res}\n");
|
||||
let req;
|
||||
let dt;
|
||||
(req, dt) = startup(&data);
|
||||
serial::read_messages(req, &dt);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user