Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Jim Bauwens

Pages: 1 ... 99 100 [101] 102 103 ... 125
1501
Lua / Controlling external hardware through Lua
« on: July 14, 2011, 04:29:29 pm »
Recently I got on the idea that the Lua print command in Nspire Lua might print to the serial console. To test this, I built a max232 TTL converter and hooked my nspire to my laptop. And yes, it printed to the serial console!
Then I ordered an Arduino Uno, with the idea to hook it up to my nspire and control stuff.

A few days ago I received it and I started working. I had some problems until today because the the voltage on serial port of the arduino was to high for my nspire, and caused a reset everytime I connected it. Today I discovered (with the help of Kerm and benryves) that its only does that when its getting its power through usb, and not the power connector. So I switched to another power supply and all was fine :)

The print command in Nspire has some limitations though, you can only send bytes with data 1 to 127, and its also not the only data that gets send to the serial port. To overcome these problems, I made a little simple protocol to talk with my arduino. A sample data packet (in ascii) looks like this:
Code: [Select]
nomOKOCEHONOKOFOOOO@BDFON\r\n"nom" defines the start of a data packets, and "\r\n" the end (it gets automatic added with print). 2 chars represent one byte that has been split in two (to be able to send 0-255).

My first real world example is controlling a little led display through my nspire. The arduino here just acts as a "proxy" to send the data to the display.






Sadly though I can send data (yet) from the arduino to my nspire, but if I do some work on reverse engineering the other dock connector pins, I think I'll be able to find a solution.

Edit:

1502
Lua / Re: What's wrong with my code???
« on: July 13, 2011, 04:12:08 pm »
First of all your code is over complicated, you are making it much more hard than you should.
I would suggest to try to make it much more simple. I know this might be hard, but it really should happen, and will help you when you are in a further stage. If you need any other help, just ask :)

1503
TI-Nspire / Re: [Lua] RayCaster
« on: July 11, 2011, 01:34:19 pm »
This is real nice, good job Chockosta!

1504
Miscellaneous / Re: post your website url
« on: July 11, 2011, 01:32:31 pm »
Mine are:

http://jimbauwens.110mb.com/ I used to host some files here, but I now have my own server.
http://bwns.be  I'm admin of this server, and its located in my house.
http://bwns.be/jim is my personal directory.
http://paste.bwns.be is my little pastebin.

I've got some other little stuff but they don't really count.

1505
TI-Nspire / Re: Pacman Lua
« on: July 10, 2011, 03:49:45 pm »
Currently sound isn't the most easy thing to do. It is possible, but requires lots of programming work and possibly some hardware work (like adding a resistor after the output).

1506
News / Re: The future of TI-BANK compromised?
« on: July 10, 2011, 03:40:19 pm »
Hmm, this is not nice :(
Do you know what triggered it this time?

1507
TI-Nspire / Re: Pacman Lua
« on: July 09, 2011, 05:10:32 pm »
That partially because he moves in big chunks. In my game, the player moves very smooth, which makes that I need many redraws.

1508
Miscellaneous / Re: LOOK AT Eeems respect !!!
« on: July 09, 2011, 05:06:37 pm »
Its ok, Juju is taking care of it :)

1509
Miscellaneous / Re: LOOK AT Eeems respect !!!
« on: July 09, 2011, 05:03:07 pm »
Hm, thanks for saying this. Looks like a troll was busy ...

1510
TI-Nspire / Re: Pacman Lua
« on: July 09, 2011, 05:01:44 pm »
Yes, I follow you :)
My point is (in game applications, with many graphics), redrawing every time the screen when you change something, can be quit slow. That is why I only redraw a part and change only a couple of images. I'm absolutely sure this is faster, but I haven't done test to find the exact speed.

1511
TI-Nspire / Re: Pacman Lua
« on: July 09, 2011, 04:53:36 pm »
Well, the thing is that I don't have to draw more images if I use this. Redrawing the screen alone might be faster, but for many games that need images, the combination will be faster. drawImage really can be a bottleneck in programs, and that is why I try to limit using it with redrawing only parts.

1512
Lua / Re: Third-party ports of Lua to TI calculators...
« on: July 09, 2011, 03:55:05 pm »
Thanks for all your work Lionel!
Its quite interesting, and might be a good learning tool for other people in the future :)

1513
Lua / Re: Lua Routines
« on: July 09, 2011, 03:53:12 pm »
I haven't posted many routines here, but its ok for me :)

1514
TI-Nspire / Re: [TI-Nspire] Make3D - TI-Basic to Lua
« on: July 09, 2011, 03:52:00 pm »
That looks real impressive!

1515
TI-Nspire / Re: Pacman Lua
« on: July 09, 2011, 03:38:35 pm »
Well, I'm developing a game (not saying the name :p) and the extra parameters are really important for me. Now I don't need to redraw all the images on the screen using gc:drawImage (which is slow), and I notice a big speedup. The game will be unplayable without it.

Pages: 1 ... 99 100 [101] 102 103 ... 125