Hi,
I'm very new to rust and am bamboozled by this and can't seem to find a solution looking at similar issues.
`
use std::io;
use std::ascii;
use std::time::Duration;
use std::time::Instant;
use std::thread::sleep;
extern crate tessel;
extern crate unix_socket;
extern crate libc;
use tessel::Tessel;
use tessel::Port;
use std::sync::{Arc, Mutex, MutexGuard};
use std::marker::PhantomData;
use std::sync::atomic::Ordering;
use protocol::{Command, reply, PortSocket};
use std::os::unix::net::UnixStream;
pub mod protocol;
fn main(){
//Create new Tessel
let mut tessel = Tessel::new();
loop {
println!("Step 1");
sleep(Duration::from_millis(3000));
println!("Step 2");
//EnableSpi{ mode: 0x0a, freq: 0xE1, div: 0xE1 };
sleep(Duration::from_millis(3000));
println!("Step 3");
//EnableSpi{ mode: 0x0c, freq: 0xE1, div: 0xE1 };
sleep(Duration::from_millis(3000));
println!("Step 4");
//EnableSpi{ mode: 0x12, freq: 0xE1, div: 0xE1 };
sleep(Duration::from_millis(3000));
}
}`
To which gives the error:
thread 'main' panicked at 'called Result::unwrap() on an Err value: Os { code: 2, kind: NotFound, message: "No such file or directory" }', libcore/result.rs:945:5
note: Run with RUST_BACKTRACE=1 for a backtrace.
I'm trying to run the code just to print to see if everything is running before adding the code to accompany all the items in use.
Hi,
I'm very new to rust and am bamboozled by this and can't seem to find a solution looking at similar issues.
`
use std::io;
use std::ascii;
use std::time::Duration;
use std::time::Instant;
use std::thread::sleep;
extern crate tessel;
extern crate unix_socket;
extern crate libc;
use tessel::Tessel;
use tessel::Port;
use std::sync::{Arc, Mutex, MutexGuard};
use std::marker::PhantomData;
use std::sync::atomic::Ordering;
use protocol::{Command, reply, PortSocket};
use std::os::unix::net::UnixStream;
To which gives the error:
I'm trying to run the code just to print to see if everything is running before adding the code to accompany all the items in use.