Step one
Go to the app store and search "Accellerometer-Simulator" I stumbled apon this app when I was needing to test the accellerometer on my PC for a app I was creating.
Step two
View the app and download/install
Step 3
Use the settings above in the networks tab of the application
Step 4
Select the type you want and then on your mirc type /acce
The snippit as code is absolute shite in all honesty since the fact that I wrote it just for myself if you get me. Secondly its just a test snippet so you can see how you can use the accellerometer data for any of your scripts. Please note I only used X and Y axis however there is also Z... To get z's data use: $calc(($gettok(%acc,5,44) +3)
This will give you a number between 0 and 6
And finally in all honesty im not even sure I did the angle correct xD but it all works the same (Im shit at maths).
alias acce {
sockudp -k acce 1337 127.0.0.1 1337
window -pBC @acce 0 0 1200 1200
window -pBC @acce.buff 0 0 1200 1200
clear @acce
clear @acce.buff
set %x.dot2 0
set %x.lastdot 300
set %y.lastdot 300
}
menu @acce {
dclick:{
set %x.lastdot 300
set %y.lastdot 300
clear @acce.buff
}
}
on 1:udpread:acce:{
sockread %acc
var %x.percent $calc((100 / 600) * $calc(($gettok(%acc,3,44) +3) * 100))
var %x.angle $calc((180 / 100) * %x.percent)
var %y.percent $calc((100 / 600) * $calc(($gettok(%acc,4,44) +3) * 100))
var %y.angle $calc((180 / 100) * %y.percent)
drawrect @acce.buff 14 80 0 0 0 0
drawtext -p @acce.buff 8 0 0 X: $calc($round($calc(($gettok(%acc,3,44) +3))) * 100)
drawtext -p @acce.buff 0 0 12 Y: $calc($round($calc(($gettok(%acc,4,44) +3))) * 100)
drawtext -p @acce.buff 15 0 24 X.Drawing: %y.lastdot
drawtext -p @acce.buff 15 0 36 Y.Drawing: %x.lastdot
if (%y.angle > 97) var %offset 1
if (%y.angle < 86) { var %offset -1 | var %down 1 }
if (%x.angle > 97) var %offset2 1
if (%x.angle < 86) { var %offset2 -1 | var %down 1 }
if (%y.angle > 86 && %y.angle < 97) var %offset 0
if (%x.angle > 86 && %x.angle < 97) var %offset2 0
if (!%down) {
set %y.lastdot $iif(%y.angle > %x.angle,$calc(%y.lastdot + %offset),%y.lastdot)
set %x.lastdot $iif(%x.angle > %y.angle,$calc(%x.lastdot + %offset2),%x.lastdot)
}
else {
set %y.lastdot $iif(%x.angle > %y.angle,$calc(%y.lastdot + %offset),%y.lastdot)
set %x.lastdot $iif(%y.angle > %x.angle,$calc(%x.lastdot + %offset2),%x.lastdot)
}
drawdot @acce.buff 4 1 %y.lastdot %x.lastdot
drawcopy @acce.buff 0 0 1200 1200 @acce 0 0 1200 1200
}