Enjoy programming more!
Kidspod is a post site which supports young programmers.
First step to join us.
Register as a member
For members

2019/04/18 10:49:25

MixJuice GET URL : kidspod.club/mj/788

IchigoLatte PanCake ライブラリ

詳細は イチゴジャム レシピ で公開しています。
「プログラムをみる」を参照して下さい。

SOURCE CODE

// IchigoLatte PanCake library
// CC0 1.0 Public Domain Dedication - https://creativecommons.org/publicdomain/zero/1.0/

function pc-init(){
  uart(10);
}

function pc-clear(cn){
  uart(128,4,0,cn);
}

function pc-line(x1,y1,x2,y2,cn){
  uart(128,8,1,x1,y1,x2,y2,cn);
}

function pc-circle(xc,yc,ra,cn){
  uart(128,7,14,xc,yc,ra,cn);
}

// fs and ca are required
function pc-stamps(px,py,si,fs,ra){
  uart(128,8,20,px,py,si,fs,ra);
}

function pc-image(in){
  uart(128,4,4,in);
}

function pc-video(os){
  uart(128,4,5,os);
}

function pc-sStart(in){
  uart(128,4,6,in);
}

function pc-sCreate(sn,si){
  uart(128,5,7,sn,si);
}

function pc-sMove(sn,px,py){
  uart(128,6,8,sn,px,py);
}

function pc-sFlip(sn,fs){
  uart(128,5,16,sn,fs);
}

function pc-sound(o0,s0,o1,s1,o2,s2,o3,s3){
  uart(128,11,9,o0,s0,o1,s1,o2,s2,o3,s3);
}

function pc-sound1(cn,on,sn){
  uart(128,6,10,cn,on,sn);
}

// If ch>=4, all channels is sounded
function pc-mPlay(ss,ch){
  if(ch<4) {
    uart(128,5,12,ss,ch);
  } else {
    uart(128,4,12,ss);
  }
}

function pc-mLoad(ch,mn){
  uart(128,8,21,ch,mn);
}

function pc-reset(){
  uart(128,3,13);
}

function pc-out(pf){
  uart(128,4,15,pf);
}

function pc-bps(rrrr){
  uart(128,4,19,rrrr);
}

COMMENT