Skip to content

Instantly share code, notes, and snippets.

View apurvanandan1997's full-sized avatar
🏠
Working from home

Apurva Nandan apurvanandan1997

🏠
Working from home
View GitHub Profile
use std::fs;
use std::env;
fn main()-> std::io::Result<()> {
let args: Vec<String> = env::args().collect();
if args[1]=="-r"{
println!("Recurse");
Ok(())
}
else {
let meta = fs::symlink_metadata(args[1].clone());
@apurvanandan1997
apurvanandan1997 / ultasonicexample.ino
Created February 11, 2019 21:17
This code inputs distance from ultrasonic sensor and prints on serial port.
/*
* Ultrasonic Sensor HC-SR04 and Arduino Tutorial
*
* by Dejan Nedelkovski,
* www.HowToMechatronics.com
*
*/
// defines pins numbers
const int trigPin = 9;
const int echoPin = 10;
----------------------------------------------------------------------------------
-- Company: apertus° Association
-- Engineer: Apurva Nandan
--
-- Create Date: 00:22:57 08/05/2019
-- Design Name:
-- Module Name: ft601
-- Project Name:
-- Target Devices:
-- Tool versions:
----------------------------------------------------------------------------------
-- Company: apertus° Association
-- Engineer: Apurva Nandan
--
-- Create Date: 00:22:57 08/05/2019
-- Design Name:
-- Module Name: ft601
-- Project Name:
-- Target Devices:
-- Tool versions:
----------------------------------------------------------------------------------
-- Company: apertus° Association
-- Engineer: Apurva Nandan
--
-- Create Date: 00:22:57 08/05/2019
-- Design Name:
-- Module Name: ft601
-- Project Name:
-- Target Devices:
-- Tool versions:
#include <thread>
#include <chrono>
#include "common.hpp"
static bool fifo_600mode;
static thread measure_thread;
static thread write_thread;
static thread read_thread;
static const int BUFFER_LEN = 32*1024;
static unsigned int check=0;
#!/bin/sh
#+-+-+-+-+-+-+-+- Invoking all tools with one case statement +-+-+-+-+-+-+
#
# Common code is executed, synbatch/certbatch/protobatch is not executed in case of synplify,
# if program is not found an error is generated in true batch mode synbatch/certbatch
# is invoked with original switches.
# $Header: //synplicity/ui2017q2p1/unix_scripts/bin/config/execute#1 $
#
#+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
reqtmp=300
----------------------------------------------------------------------------------
-- Company: apertus° Association
-- Engineer: Apurva Nandan
--
-- Create Date: 00:22:57 08/05/2019
-- Design Name:
-- Module Name: ft601_top
-- Project Name:
-- Target Devices:
-- Tool versions:
-- VHDL netlist generated by SCUBA Diamond (64-bit) 3.10.0.111.2
-- Module Version: 5.8
--/usr/local/diamond/3.10_x64/ispfpga/bin/lin64/scuba -w -n unmodified -lang vhdl -synth synplify -bus_exp 7 -bb -arch xo2c00 -type iol -mode in -io_type LVDS25 -width 5 -freq_in 375 -gear 4 -clk eclk -aligned -del 8
-- Mon Aug 26 03:11:20 2019
library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
#include <thread>
#include <chrono>
#include "common.hpp"
static bool fifo_600mode;
static thread measure_thread;
static thread write_thread;
static thread read_thread;
static const int BUFFER_LEN = 32*1024;
static unsigned int check=0;