forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

how to transfer a string from a psp to another with lua

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Lua Player Development
View previous topic :: View next topic  
Author Message
silvio_stefa



Joined: 16 Jun 2008
Posts: 2

PostPosted: Mon Jun 16, 2008 5:35 am    Post subject: how to transfer a string from a psp to another with lua Reply with quote

hi i'm new on this forum.
I want to make a psp program which give me the possibility to use a psp to control another one by wifi or irdata .
I've tryed a lot of time...but now i'm very nervous...

The thing wich I want to do is a program that pressed a control on the first psp send a string to the second psp which print on the screen the control pressed.

In order to do this i wrote two programs.

the ricevitor:
green = Color.new(0, 255, 0)
sfondo=Image.load("03.png")
mess="niente"
c=0


Adhoc.init()
screen:blit(0,0,sfondo)
screen.flip()
screen:print(200,110,"mess",green)

---verifica connessione ---
while c==0 do

Adhoc.connect()
c=Adhoc.getState()
screen:print(200, 100,"connessione",green)
screen.flip()


end

while true do

screen:blit(0,0,sfondo)
screen:print(200,100,mess,green)
screen.flip()

mess=0
mess=Adhoc.recv()
mess=0

pad = Controls.read()



if pad:start() then

mess="start" end

if pad:select() then
Adhoc.term()

screen:blit(100,100,el) end

if mess=="x" then
screen:blit(100,100,el) end

screen:blit(0,0,sfondo)

screen:print(200,100,mess,green)



screen.flip()


end



and the trasmettitor:




mess=0
c=0
a=0

Adhoc.init()
green = Color.new(0, 255, 0)

sfondo=Image.load("03.png")
screen:blit(0,0,sfondo)
screen.flip()
Adhoc.connect()


---verifica connessione---
while c==0 do
Adhoc.connect()
c=Adhoc.getState()
screen:print(200, 100,"connessione",green)
screen.flip()
end


while true do
a=Adhoc.getMac()
screen:blit(0,0,sfondo)

screen:print(200, 100,"premi un tasto",green)
screen:print(200, 80,"connesso!1",green)

screen:print(200, 60,a,green)

screen.flip()

pad = Controls.read()

if pad:start() then

mess="start" end

if pad:select() then
Adhoc.term()

screen:blit(100,100,el) end



if pad:up() then mess="su"

end


if pad:down() then mess= "giu"

end



if pad:r() then

mess="r"

end


if pad:l() then

mess="l"

end


if pad:cross() then
mess="x"
end

Adhoc.send(mess)
screen:blit(0,0,sfondo)
screen:print(200, 200,mess,green)
screen:print(200, 80,"connesso!1",green)
screen:print(200, 60,a,green)
screen.flip()

end






what is wrong? why this doesn't do what i want?
to run it i use lua player HM7.
where can i found a guide to the psp wifi lua function? (i didn't find one on google)

please someone help me!!!!!
sorry for my English .
thanks.
Back to top
View user's profile Send private message
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Mon Jun 16, 2008 11:39 am    Post subject: Reply with quote

The only info on PSP Lua Player I'm aware of is:
http://wiki.ps2dev.org/psp:lua_player:functions
Back to top
View user's profile Send private message AIM Address
silvio_stefa



Joined: 16 Jun 2008
Posts: 2

PostPosted: Mon Jun 16, 2008 3:18 pm    Post subject: example? Reply with quote

I've just seen it but i can't understand how to make a adhoc comunication between the two psp...
Do you know a place were i can find more information and example about this?
thank you
Back to top
View user's profile Send private message
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Mon Jun 16, 2008 3:43 pm    Post subject: Reply with quote

You might try the Lua Help forum over at PSP-Programming.

http://www.psp-programming.com/forums/index.php?board=4.0

I've only recently started looking at Lua myself, so I don't know where all the Lua people hang out. :)
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Lua Player Development All times are GMT + 10 Hours
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