Skip to content

Instantly share code, notes, and snippets.

@yuasatakayuki
yuasatakayuki / flowchart_sample.html
Created January 28, 2016 12:27
テキスト形式でフローチャートを作図する例 - flowchart.js
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
</head>
<body>
<script src="raphael-min.js"></script>
<script src="flowchart-latest.js"></script>
@yuasatakayuki
yuasatakayuki / the_open_source_space_project.md
Created February 15, 2016 03:48
The open-source SpaceWire project

Overview

SpaceWire is the standard data transfer and network interface which is standardized as ECSS-E-ST-50-12C lead by the European Space Agency (ESA). RMAP is a short for Remote Memory Access Protocol which is the standardized data transfer protocol over SpaceWire (ECSS-E-ST-50-52C).

@yuasatakayuki
yuasatakayuki / open_source_spacewire_rmap_ip_cores.md
Created February 15, 2016 03:41
Open-source SpaceWire and SpaceWire-RMAP IP Cores
@yuasatakayuki
yuasatakayuki / esp01_oled_bme280.cpp
Created January 1, 2017 13:17
Arduino sketch for ESP-01 + OLED + BME280
#include <stdio.h>
#include <Wire.h>
#include <ESP8266WiFi.h>
#include <BME280.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
// WiFi configuration
const char* ssid = "WIFI_SSID";
const char* password = "WIFIT_PASSWORD";
@yuasatakayuki
yuasatakayuki / ruby_gnuplot_time_series.rb
Last active October 6, 2021 14:50
Plot time-series data using Ruby Gnuplot
require "gnuplot"
data=<<EOS
2016-07-19T23:47:53.432Z 33.2
2016-07-19T23:41:59.558Z 33.1
2016-07-19T23:36:06.183Z 32.9
2016-07-19T23:30:09.101Z 32.7
2016-07-19T23:24:15.936Z 32.6
2016-07-19T23:18:19.082Z 32.4
2016-07-19T23:12:20.944Z 32.4
@yuasatakayuki
yuasatakayuki / install_heasoft.sh
Last active September 3, 2020 18:49
Heasoft download, build, and install script
#!/bin/bash
cat << EOF
#============================================
# Heasoft download, build, and install script
#
# For the latest version of this script, visit the gist:
# https://gist.github.com/yuasatakayuki/8176d73f7e716f95587b
#
# This script uses the Heasoft mirror hosted at the JAXA/ISAS.
@yuasatakayuki
yuasatakayuki / read_mcp3208.c
Created June 5, 2015 09:05
AD conversion using MCP3208 on Raspberry Pi convers
/*
* Before running this program, execute the following initialization command:
* > gpio load spi
*
* Expected result:
* > pi@raspberrypi:~$ ./read_mcp3208
*
* wiringPiSPISetup status = 3
* wiringPiSPIDataRW status = 3
* data[0]=00
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@yuasatakayuki
yuasatakayuki / ssd1306_japanese_font.py
Created June 19, 2016 05:26
Raspberry Pi 3で128×64ピクセルのOLEDに日本語を表示するサンプル
# -*- coding: utf-8 -*-
import Adafruit_GPIO.SPI as SPI
import Adafruit_SSD1306
import Image
import ImageDraw
import ImageFont
# Raspberry Pi pin configuration
#include <SoftwareSerial.h>
// Serial.print() outputs to the USB-UART (i.e. eventually to the PC).
//
uint8_t PIN_ORANGE_LED = PD7;
uint8_t PIN_BUZZER = PD6;
uint8_t PIN_SOFT_UART_RX = PD4;
const uint8_t BUFFER_SIZE = 16;