Skip to content

Instantly share code, notes, and snippets.

@MinatsuT
MinatsuT / ProMicro_DualJoyStick
Last active April 28, 2021 22:02
Dual JoyStick Example using Arduino Joystick Library
#include <Joystick.h>
Joystick_ joy = Joystick_(
0x03, // hidReportId
JOYSTICK_TYPE_GAMEPAD, // joystickType
2, // buttonCount
0, // hatSwitchCount
true, // includeXAxis
true, // includeYAxis
false, // includeZAxis
@MinatsuT
MinatsuT / gist:1e5fe563fa2ffbf385d1523e9bce0d84
Created January 9, 2021 18:08
Calculation of the intersection of line segments for PiSTARTER.
'2つの線分の交点を求めるプログラム(交差判定) by みなつ
option strict
acls
var sw=320,sh=176:xscreen sw,sh
while 1
main
wend
end
@MinatsuT
MinatsuT / gist:3e3f21aad003aaf626203ea18f8a1726
Created December 24, 2020 17:27
Universal Remote for PiSTARTER
'学習リモコン by みなつ
option strict
acls
'xscreen 1280,720
var sw,sh,sa:xscreen out sw,sh,sa
var cx,cy,cw,ch:console out cx,cy,cw,ch
var RECPIN=#GPIO4, LEDPIN=#GPIO18
gpiomode RECPIN, #GPIOMODE_IN
backcolor rgb(0,0,128)
main
@MinatsuT
MinatsuT / IR_Read.prg
Last active December 20, 2020 14:20
IR reader for PiSTARTER
' Read signals of IR sensor (active low) via GPIO4.
option strict
acls
var sw,sh,sa:xscreen out sw,sh,sa
var cx,cy,cw,ch:console out cx,cy,cw,ch
gpiomode #GPIO4, #GPIOMODE_IN
backcolor rgb(0,0,128)
main
end
@MinatsuT
MinatsuT / ds_wipe.prg
Created October 28, 2020 16:40
"Dragon Slayer The Legend of Heroes" like wipe-out routine for PiSTARTER.
option strict
acls
var sw,sh,aspect
xscreen out sw,sh,aspect
while 1
go 1
go 5
go 10
wend
@MinatsuT
MinatsuT / LRLINE_round.prg
Created June 16, 2020 13:53
Libble Rabble line with round pile
option strict
acls
xscreen 320,176
var w,h,aspect
xscreen out w,h,aspect
backcolor rgb(0,128,0)
var lc%=rgb(0,192,255)
var fc%=rgb(255,192+16,128+16)
var sth=0.1
dim vram%[w,h]
@MinatsuT
MinatsuT / LR_LINE.prg
Last active June 15, 2020 18:42
Libble Rabble line for PiSTARTER
option strict
acls
xscreen 320,176
var w,h,aspect
xscreen out w,h,aspect
backcolor rgb(0,128,0)
var lc%=rgb(0,192,255)
var fc%=rgb(255,192+16,128+16)
var sth=0.1
dim vram%[w,h]
@MinatsuT
MinatsuT / TriPaint.prg
Created June 4, 2020 13:52
Libble Rabble like triangle painting
option strict
acls
var w=320,h=176
xscreen w,h
backcolor rgb(0,128,0)
var c%=rgb(255,192+16,128+16)
dim x[3],y[3]
while 1
--- src/helper/options.c 2020-05-24 00:57:37.423061762 +0900
+++ ../../openocd-esp32/src/helper/options.c 2020-05-16 11:43:58.379872344 +0900
@@ -34,9 +34,11 @@
#if IS_DARWIN
#include <libproc.h>
#endif
+#ifndef __linux__
#ifdef HAVE_SYS_SYSCTL_H
#include <sys/sysctl.h>
#endif
@MinatsuT
MinatsuT / RaceCourse.prg
Created May 20, 2020 15:25
無限道路生成 for PiSTARTER
'無限道路生成 by みなつ
option strict
acls
var sw,sh,aspect
xscreen 320,176
xscreen out sw,sh,aspect
var ox=sw/2,oy=sh-1 '原点の座標(画面下中央)
var n=5 '節の数
dim d[n] '節毎の折れ角