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 ... 97 98 [99] 100 101 ... 125
1471
« on: July 25, 2011, 09:40:42 am »
Eh, looks like there is a bug in the first top post that make the quality worse ... * jimbauwens goes change the top post Edit, sorry for the double post! Edit2: video:
1472
« on: July 25, 2011, 09:21:36 am »
Well, you might be able to squeeze 2 little cables between the connector strip and the thing that covers it. Tape will also work, but you need to be sure that its on the right spot.
1473
« on: July 25, 2011, 09:15:36 am »
You need to connect the speaker (or headphone) between the TX and the GND pins on the dock port. This picture shows how to connect the speaker (Credit goes to TI BANK): Edit: better picture, thanks Critor!
1475
« on: July 25, 2011, 09:09:47 am »
Here is a little piece of code to play Happy birthday with Lua from your nspire:
TONE_LOW = "\001" TONE_HIGH = "\255"
happy_birthday = {262,0.5,262,0.5,294,1,262,1,349,1,330,2,262,0.5,262,0.5,294,1,262,1,392,1,349,2,262,0.5,262,0.5,523,1,440,1,349,1,330,1,294,3,466,1,466,1,440,1,349,1,392,1,349,2}
function freq_key(key) --return 440 * math.pow(2, (key-49)/12) return key end
function keytone(key) local am = 57600/freq_key(key) return TONE_HIGH:rep(am) .. TONE_LOW:rep(am) end
function key_am(key, ammount) return keytone(key):rep(ammount) end
function key_time(key, time) return key_am(key, freq_key(key)*time) end
function play() local out = "" for i=1,#happy_birthday,2 do out = out..key_time(happy_birthday[i]*5, happy_birthday[i+1]/10) end print(out) end
function on.timer() play() timer.stop() end
function on.paint(gc) timer.start(1) end
However, the quality is not so good, because I can't send a byte that contains only 0's, and there is a stop bit at the end of each byte I send (I think). But its ok, you can have fun with it :p
I currently connect a directly a little speaker between the TX and the GND pins of my nspire, but I do not know if this is so safe. Should I add an diode in between?
1477
« on: July 25, 2011, 05:38:12 am »
Yeah, he still can do that. But my point is that its not like the other time, where to forum was not so easy to backup.
Anyway, I almost can't understand how he doesn't see that you guys are just trying to help him. I don't know all his details though. I think he just doesn't want to lose his power, and sees Critor as a threat.
1478
« on: July 25, 2011, 03:21:33 am »
This is really sad Its a good think though that the forum is safe now...
1479
« on: July 25, 2011, 01:32:06 am »
ephan, I have the basis of a game, with smooth scrolling. Its actually intended for the contest, but I haven't had much time to work on it
1480
« on: July 25, 2011, 01:29:02 am »
Well, its Processing, but I think its valid C anyway :p
1481
« on: July 24, 2011, 04:33:44 pm »
The speed is 115200 baud. I'll try to make a little example soon
1482
« on: July 24, 2011, 10:24:05 am »
Yes, but if normally it should be less hard because the scripts is already configured and all the dependencies are installed
1483
« on: July 23, 2011, 02:57:23 pm »
Well, you need to think how the character looks in binary, and try to make waveforms with it. Not so easy, but I'll try to make a simple library one of these days to make it simple You can only send data with one port on the serial port, as the other one is input (you can't use it in Lua)
1484
« on: July 23, 2011, 02:07:17 pm »
Hi, I'm still looking at your code, because its so big and I can't test it right now. But here already a suggestio: Use Lua native functions instead of calling them through math.eval() (if they are available). This will improve the speed. I'm still looking at your code, and will post an update as soon as I test it
1485
« on: July 23, 2011, 02:54:54 am »
Loulou, nice to see you here on Omnimaga I have playing around with the serial port on the nspire, and by sending large chunks of data to it (using print), you can make some sound. The problem is that you can't do anything while it is busy Or ... you can hook up an arduino, and let that do the sound processing
Pages: 1 ... 97 98 [99] 100 101 ... 125
|