android
  #61  
Old 12-15-2009, 03:22 PM
rphunt2002 rphunt2002 is offline
Junior Member
 
Join Date: Nov 2009
Posts: 52
Default

Quote:
what about reading the soduku.lua...what program would i use?
That's mentioned here:
http://www.anythingbutipod.com/forum...842#post418821

Note that there is a new thread for continuing this effort, which is here:
http://www.anythingbutipod.com/forum...ad.php?t=50306

Quote:
i'd like to use lua to change a few little things
-thicker volume control always showing
-turn off screen while docked
-move scroller position to touch point without having to drag the little button
If you're talking about the player interface itself, you'd have to know where that code lives, and how to do a custom firmware update. The LUA we're doing here is for additional apps, not for tweaking the player.
Reply With Quote

Advertisement [Remove Advertisement]

  #62  
Old 12-15-2009, 04:02 PM
ThievingSix ThievingSix is offline
Member
 
Join Date: Aug 2008
Posts: 218
Default

Trust me, I've tried to find out the directory of this player is. The user interface IS made in lua. The convient problem is they left out io.pcall() and os.exec()...
Reply With Quote

  #63  
Old 12-15-2009, 10:51 PM
Awaken321 Awaken321 is offline
Junior Member
 
Join Date: Dec 2009
Posts: 3
Default This is great!

This is great that someone learned about Lua being the language of this player.

I currently own one, and am a fluent programmer in C++, Some Python, HTML, JavaScript, XML, Part time Ruby, and a few others so I picked up on Lua fast.

I have been messing around and my biggest problem is that I must unplug my player every time I want to test my apps, is there some environment I can use to test them before I waste time plugging and unplugging the player?

Thanks for your help, keep up the good work.
Reply With Quote

  #64  
Old 12-15-2009, 11:04 PM
ThievingSix ThievingSix is offline
Member
 
Join Date: Aug 2008
Posts: 218
Default

I am planning on making on as soon as I complete the function list is complete, I urge you to help out as well! http://en.wikipedia.org/wiki/User:Th...a#Whats_needed
Reply With Quote

  #65  
Old 12-17-2009, 07:21 PM
ThievingSix ThievingSix is offline
Member
 
Join Date: Aug 2008
Posts: 218
Default

Alright, a couple things wrong. First: After ever text draw you did a fillrect which clears what you just drew. Second I believe a few of your text draws might have incorrect syntax. Third you didn't give the os a sleep time(which I find is essential). Fixed code below. Also, as I have said in previous posts, I will make an external script environment once the 1.1 Whats needed section of my wiki function list is done so if you can contribute please do! =)

Code:
color_black = color.new(0,0,0);
color_date = color.new(255,255,255);

i = 0;
screen.clear();
screen.fillrect(0,0,400,240,color_black);
screen.update();

while true do
  if (control.read() == 1) and (control.isButton() == 1) and (button.home() == 1) and (button.click() == 1) then
    screen.fillrect(0,0,400,240,color_black);
    if (i == 0) then
      i = i + 1;
      text.color(color_date);
      text.size(29);
      text.draw(0,0,"1","left",400);
      screen.update();
    elseif (i == 1) then
      i = i + 1;
      text.color(color_date);
      text.size(29);
      text.draw(0,0,"2","right",400);
      screen.update();
    elseif (i == 2) then
      i = i + 1;
      text.color(color_date);
      text.size(29);
      text.draw(0,10,"3","center",400);
      screen.update();
    elseif (i == 3) then
      i = i + 1;
      text.color(color_date);
      text.size(25);
      text.draw(0,60,"Press Again To Exit","center",400);
      screen.update();
    else
      break;
    end;
  end;
  os.wait(10);
end;
Reply With Quote

  #66  
Old 12-17-2009, 10:20 PM
Awaken321 Awaken321 is offline
Junior Member
 
Join Date: Dec 2009
Posts: 3
Default Thanks ;)

That's great!
Thanks for your help, I should have thought about it more.
I am only two days into Lua programming so I have errors in my work still.
*I did write all that code though, so it's a start =)*

I would be happy to help however I can, what exactly are you looking for?
I could try to test some of the functions listed.

How are you going to write the external script environment?
I am interested in all this because I am a part time programmer.

My best language is C++ but I know a few others.

Thanks again for your help,
-Awaken321
Reply With Quote

  #67  
Old 12-17-2009, 10:41 PM
ThievingSix ThievingSix is offline
Member
 
Join Date: Aug 2008
Posts: 218
Default

Everything in the whats needed section needs more information. So the things that I don't know what the hell they do, or how the work I need help with =)
Reply With Quote

  #68  
Old 12-17-2009, 10:55 PM
Awaken321 Awaken321 is offline
Junior Member
 
Join Date: Dec 2009
Posts: 3
Default

I was just testing out os.wait() function for fun, but I cannot find any difference what so ever between it and os.sleep() it accepts time in a setting of milliseconds.

What do you make of that?
I am working on some others, but I am not sure how to test them.
Reply With Quote

  #69  
Old 12-17-2009, 11:13 PM
ThievingSix ThievingSix is offline
Member
 
Join Date: Aug 2008
Posts: 218
Default

The only ones I've tested and still have no idea are the accelerometer ones. Otherwise all the things in the Whats Needed section I haven't touched. I'm new to lua because of this player too but it's quite fun.
Reply With Quote

  #70  
Old 01-05-2010, 10:52 AM
novice_user novice_user is offline
Junior Member
 
Join Date: Jan 2010
Posts: 4
Default

Hello Guys. Just registered today because I'm also a trying-hard individual who really wants to learn even the basics of prgramming my Zen X-Fi2. Sorry if I may sound very noob to you but here's my question.

When I try to open the Main.Lua via notepad under the soduko app, all I'm getting are unreadable ascii characters. I am trying to absorbed everything written by you guys but honestly speaking, I'm confused. Can you please give instructions to someonle like me on how to install the LUA compiler to my PC (win) so that I can understand the code inside MAIN.LUA? I downloaded LUA 5.1.2 and don't know which file do I need to install the compiler. At least this will get me started. Thank you for the answers and sorry for being such a dumb ass.
Reply With Quote

  #71  
Old 01-05-2010, 11:31 AM
ZaPx64's Avatar
ZaPx64 ZaPx64 is offline
Member
 
Join Date: Nov 2009
Location: Germany
Posts: 136
Default

Be sure, nobody thinks you're dumb because of asking questions.
Actually you don't need a compiler, and that's the simple trick
Reply With Quote

  #72  
Old 01-05-2010, 08:53 PM
LordXenos's Avatar
LordXenos LordXenos is offline
Junior Member
 
Join Date: Dec 2009
Location: Louisville, KY, USA
Posts: 94
Default

@ novice_user
You should just be able to use notepad or wordpad to open the LUA files. If you want you can try Notepad++ (http://notepad-plus.sourceforge.net/uk/site.htm). It should be at least a little easier to code with.

Try opening a "MAIN.LUA" file from one of the home-brew apps in this forum such as the beta Boink v2: http://www.anythingbutipod.com/forum...ad.php?t=51279
__________________
If you have a question, please ask. I am more than happy to help.

Cheers,
Your friendly neighborhood
Dark Lord
Reply With Quote

  #73  
Old 01-06-2010, 10:03 AM
novice_user novice_user is offline
Junior Member
 
Join Date: Jan 2010
Posts: 4
Default

Thanks guys. I'm actually trying simple programs now on my X-Fi2. I think I have to read the wiki to get to know more on the syntax. Anyway, new firmware for X-Fi2 was released today, 1.11.01. Haven't tried it yet but will try to download it later.
Reply With Quote

  #74  
Old 01-06-2010, 11:10 AM
Olley Olley is offline
Ultra Senior Member
 
Join Date: Dec 2008
Posts: 4,894
Default

Thanks for the update notice, Novice. From Creative:

Enhancements:

Reduces the press-and-hold time when you turn your player on.
Ensures a smooth process when turning the player off.
Improves the player's stability when using FM radio.

It can be found here.
Reply With Quote

  #75  
Old 01-06-2010, 12:09 PM
badazzmofo badazzmofo is offline
Junior Member
 
Join Date: Dec 2009
Posts: 75
Default

i was sort of hoping they'd fix some of the issues that i actually give a damn about...

like THAT GODDAMNED VOLUME CONTROL!!!!!!!

did i mention that i'll personally paypal donate 30 dollars to the person who changes the latest firmware to make the volume control always showing and slightly wider?

just throwing that out there.

Last edited by badazzmofo; 01-06-2010 at 12:12 PM. Reason: cuz spam doesnt smell very good.
Reply With Quote

  #76  
Old 01-12-2010, 03:43 PM
TOFregato TOFregato is offline
Junior Member
 
Join Date: Jan 2010
Posts: 7
Default

Quote:
Originally Posted by ThievingSix View Post
Well I can't actually get anything beyond 380x235 when I'm touching.

Wanted to get the accelerometer working..but I didn't. I did however get some data:

Code:
color_black = color.new(0,0,0);
color_white = color.new(255,255,255);
color_blue = color.new(0,0,255);
color_red = color.new(255,0,0);
color_green = color.new(0,255,0);

screen.clear();
text.size(20);
text.color(color_white);

while true do
  x = accelerometer.getdata();
  y = accelerometer.get_senddatatype();
  z = accelerometer.get_samplerate();
  screen.fillrect(0,0,400,240,color_black);
  text.draw(10,10,"Accelerometer Test");
  text.draw(10,30,x);
  text.draw(10,50,y);
  text.draw(10,70,z);
  screen.update();
  if (control.read() == 1) and (button.home() == 1) then
    break;
  end;
  os.sleep(10);
end;
x: Outputs 0 always. It's probably a pointer which is telling me I'm getting NULL for a result.
y: Outputs...nothing.
z: Outputs(from the values I've noticed) -1, 8, 16, 1000, 500, 250, 64, 125. I get different values depending on how I hold it. When it's flat I get 8, 16, 1000. When it's vertical 500 gets thrown around. 90* angle? 125 and 64 as well. Way to random and way to general for use. Which leads me to think, can this thing only detect angles? If so that's a huge disappointment.
mmmh i tried this code on my x-fi2 with newest fw update.....but it doesn't work....i just get x=0, y=nothing, z=0......anyone can help me out??
Reply With Quote

  #77  
Old 01-12-2010, 06:23 PM
ThievingSix ThievingSix is offline
Member
 
Join Date: Aug 2008
Posts: 218
Default

I can't try it at the moment with the new firmware but it's entirely possible that they changed the accelerometer functions.
Reply With Quote

  #78  
Old 01-13-2010, 04:42 AM
TOFregato TOFregato is offline
Junior Member
 
Join Date: Jan 2010
Posts: 7
Default

well...i get z=35 if i start the application right after i used the accelerometer with photos......but the weird thing is that sometimes when i press the home button to exit, the player resets instead
they must have changed something with the new update....let's hope that the sdk will be soon available
Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT -5. The time now is 07:02 AM.