WiiLi Wiki frontpage Include your post in the News Get links Hoteles Quito
WiiLi.org Forum Index WiiLi.org
a new revolution
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Something went wrong...

 
Post new topic   Reply to topic    WiiLi.org Forum Index -> WiiLi HowTo
View previous topic :: View next topic  
Author Message
Esor



Joined: 07 Dec 2007
Posts: 2

Digg It
PostPosted: Fri Dec 07, 2007 10:28 pm    Post subject: Something went wrong...

I use Bluesoleil and GlovePie to connect my wii mote to my computer. In the beginning, it worked pretty well, exept that bluesoleil kept on disconnecting my wii mote after about 1mins and 30 secs. Now, i cant get it to work at all. Suddenly the wii mote wouldnt direct my mouse on my screen, and of course i tried to change the betteries and checked both the wii mote and the sensor on in a real wii game on a real TV. It worked with the TV, so it isnt the wii mote or the sensor that is ruined ( altough, the sensor fell of my screen and into my desk, so it took some time for it to find the wii mote on the TV. I think it was because it was to hot, but i might ofc be wrong. I dont think the sensor is broken tough, since it worked in the end). It has to be the programs. GlovePie cant find any bad scripting in the script I use, and also, BlueSoleil sais that my wii mote is connected trough the PC. What could this be?

Please help!

Btw: this is my script:

    // Type your program here, or click the GUI tab to autogenerate it!
    var.xtrim = 6
    var.ytrim = -31
    var.ztrim = 6

    var.deadzone = 5
    var.KITTspeed = 100 ms
    var.rumble = false

    Mouse.RightButton = Wiimote.A
    Mouse.LeftButton = Wiimote.B

    if 0 = 0 then
    if var.kitt = 0 then
    wiimote.Leds = 1
    endif
    if var.kitt = 1 then
    wiimote.Leds = 3
    endif
    if var.kitt = 2 then
    wiimote.Leds = 6
    endif
    if var.kitt = 3 then
    wiimote.Leds = 12
    endif
    if var.kitt = 4 then
    wiimote.Leds = 8
    endif
    if var.kitt = 5 then
    wiimote.Leds = 12
    endif
    if var.kitt = 6 then
    wiimote.Leds = 6
    endif
    if var.kitt = 7 then
    wiimote.Leds = 3
    endif
    wait var.KITTspeed
    var.kitt = (var.kitt + 1) % 8
    endif

    if var.rumble and (mouse.x = 0 or mouse.x = 1 or mouse.y = 0 or mouse.y = 1) then
    if var.rmbl = false
    wiimote.Rumble = 1
    wait 200 ms
    wiimote.Rumble = 0
    endif
    var.rmbl = true
    else
    var.rmbl = false
    endif

    var.accx = wiimote.RawForceX + var.xtrim
    var.accy = wiimote.RawForceY + var.ytrim
    var.accz = wiimote.RawForceZ + var.ztrim

    if wiimote.dot1vis and wiimote.dot2vis then

    if var.accy > -7 then
    var.orientation = 0
    elseif var.accy > -45 then
    if var.accx < 0 then
    var.orientation = 3
    else
    var.orientation = 1
    endif
    else
    var.orientation = 2
    endif

    if var.leftpoint = 0 then
    if var.orientation = 0 then
    if wiimote.dot1x < wiimote.dot2x then
    var.leftpoint = 1
    else
    var.leftpoint = 2
    endif
    endif
    if var.orientation = 1 then
    if wiimote.dot1y > wiimote.dot2y then
    var.leftpoint = 1
    else
    var.leftpoint = 2
    endif
    endif
    if var.orientation = 2 then
    if wiimote.dot1x > wiimote.dot2x then
    var.leftpoint = 1
    else
    var.leftpoint = 2
    endif
    endif
    if var.orientation = 3 then
    if wiimote.dot1y < wiimote.dot2y then
    var.leftpoint = 1
    else
    var.leftpoint = 2
    endif
    endif
    endif

    if var.leftpoint = 1 then
    var.fix1x = wiimote.dot1x
    var.fix1y = wiimote.dot1y
    var.fix2x = wiimote.dot2x
    var.fix2y = wiimote.dot2y
    else
    var.fix1x = wiimote.dot2x
    var.fix1y = wiimote.dot2y
    var.fix2x = wiimote.dot1x
    var.fix2y = wiimote.dot1y
    endif

    var.dx = var.fix2x - var.fix1x
    var.dy = var.fix2y - var.fix1y
    var.cx = (var.fix1x+var.fix2x)/1024.0 - 1
    var.cy = (var.fix1y+var.fix2y)/1024.0 - .75

    var.d = sqrt(var.dx*var.dx+var.dy*var.dy)

    var.dx = var.dx / var.d
    var.dy = var.dy / var.d

    var.ox = -var.dy*var.cy-var.dx*var.cx;
    var.oy = -var.dx*var.cy+var.dy*var.cx;

    var.ax = (var.ox * screen.desktopwidth) + (screen.desktopwidth / 2)
    var.ay = (-var.oy * screen.desktopwidth) + (screen.desktopheight / 2)




    var.dx = var.ax - mouse.cursorposx
    var.dy = var.ay - mouse.cursorposy

    var.d = sqrt((var.dx*var.dx)+(var.dy*var.dy))

    var.a = 180 / (200 + var.d * var.d * var.d * .001)

    if var.d <= var.deadzone then var.a = 1

    debug = var.d + " " + var.a

    var.finalx = mouse.cursorposx * var.a + var.ax * (1 - var.a)
    var.finaly = mouse.cursorposy * var.a + var.ay * (1 - var.a)


    mouse.cursorposx = var.finalx
    mouse.cursorposy = var.finaly

    else

    var.leftpoint = 0

    endif

    one = Wiimote.Up
    two = Wiimote.Down
    three = Wiimote.Left
    four = Wiimote.Right

    d = 2 > Wiimote1.Nunchuk.JoyX > 0.5
    a = -2 < Wiimote1.Nunchuk.JoyX < -0.5
    s = 2 > Wiimote1.Nunchuk.JoyY > 0.5
    w = -2 < Wiimote1.Nunchuk.JoyY < -0.5

    b = Wiimote.Plus
    c = Wiimote.Minus
    escape = Wiimote.Home
    five = Wiimote.One
    six = Wiimote.Two

    space = Wiimote.Nunchuk.CButton
    f = Wiimote.Nunchuk.ZButton


    Thanks!
[/list]
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    WiiLi.org Forum Index -> WiiLi HowTo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group