| Crates.io | rust-usbtmc |
| lib.rs | rust-usbtmc |
| version | 0.1.2 |
| created_at | 2021-04-30 16:38:28.487945+00 |
| updated_at | 2021-04-30 16:43:08.880087+00 |
| description | USBTMC driver for controlling instruments over USB. |
| homepage | https://github.com/rogerioadris/rust-usbtmc |
| repository | https://github.com/rogerioadris/rust-usbtmc |
| max_upload_size | |
| id | 391612 |
| size | 14,432 |
Exemplo de uso
use rust_usbtmc::instrument::Instrument;
const VID: u16 = 0x0699; // Vendor
const PID: u16 = 0x0368; // Product
fn main() {
let mut instr = Instrument::new(VID, PID);
// Command Osciloscope
instr.write("SELECT:CH1 1").unwrap();
println!("Ask: {}", instr.ask("*IDN?").unwrap());
}