Another screen from LCDMK (a seller). This time I tried FRC grayscale, though it would be too flickery to be practical.
Another screen from LCDMK (a seller). This time I tried FRC grayscale, though it would be too flickery to be practical.
First day of 2012, and my second LCD. SPI interface and connected to a MCS-51 microcontroller.
本文大概是我写的第一篇博文吧,09年,那年我应该是小学五年级。文本有经过改动,代码没有修改。
有这么一篇文章:《利用thinkpad aps重力感应系统玩游戏!!!》,不知道用小黑的朋友有没有看过,www.douban.com/note/39019617/ 通过调用APS来玩游戏。
APS是ThinkPad内置的一套硬盘保护系统,原理是利用加速度传感器来检测冲击,并在冲击发生时暂停硬盘操作以保护硬盘。本文讨论的是如何自己编程来读取APS的数据。
在类型定义里加入:
ACCElREPORT = record
PresentState:integer;
LatestRawAccelDataX:word;
LatestRawAccelDataY:word;
LatestAccelDataX:word;
LatestAccelDataY:word;
Temperature:char;
LatestZeroG_X:word;
LatestZeroG_Y:word;
end;
PACCELREPORT=ACCELREPORT;
HDAPS_API = Integer;
ReadHDAPS = function(pAcceleration:PACCELREPORT):HDAPS_API;stdcall;
变量定义:
HDAPS: ReadHDAPS; hDLL: THandle; HDAPSData: ACCElREPORT; OffsetX: Integer; OffsetY: Integer; LoadOK: Boolean;
DLL加载:
try
{Get DLL}
hDLL := LoadLibrary('Sensor.dll');
if hDLL <> 0 then
HDAPS := GetProcAddress(hDLL,'ShockproofGetAccelerometerData');
except
on ex:Exception do
begin
ShowMessage('Error:'+ex.Message);
Close;
end;
end;
if (HDAPS(@HDAPSData)=1) then
LoadOK := True;
DoubleBuffered := True;
#演示应用
我写了个鼠标控制器,可以用来玩仓鼠球。图:
这里是ZephRay的个人网站,主要内容为电子和古董计算机、计算器相关,使用了Xplosiss作为内容管理(以前是Dokuwiki)。
This is website of ZephRay, mainly about electronics and vintage computing. Limited by the time I have, I currently do not have everything in English. You may use Google Translate or send me an Email about the question you may have.