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.

Topics - Nick

Pages: [1] 2 3 4
Other / ATtiny85 led matrix clock
« on: March 23, 2013, 11:20:20 am »

I made this new clock, and thought of sharing it with you guys.
It's running on an ATtiny85 (8pins, 16MHz) IC, which is pretty small.
Using two 74HC595 shift registers (only taking up three wires) and two buttons, you can control the mode the clock displays the time, as well as setting the correct time.
A friend of mine made the aluminum casing, which makes it look very neat.

here's a video of it running:

for more info or files, please visit my website

Calculator C / Nspire RS232 communication
« on: January 29, 2013, 12:36:49 pm »

I was looking for some tutorial or example code about the RS232 reading/writing stuff from the Nspire, but I did not find anything yet (I found the stuff on hackspire, but there's no code there if I'm not mistaken)
Has someone written some code to do this?

What I want to do is reading and writing from/to the serial port, because of the reading part it has to be done in C, unless there's another solution I don't know about.


Site Feedback and Questions / OmnomIRC timeout error
« on: January 26, 2013, 07:42:36 am »

Since yesterday night (about 11 hours ago), I started getting this error:

I have no clue what causes the problem, I'm logged in correctly, so that's not the reason.
Also, it gives this error (I couldn't show in the picture, or had to post 2):
Error 118 (net::ERR_CONNECTION_TIMED_OUT): The operation timed out.

I guess that's because the server doesn't react, but I didn't see any topics yet, so I thought I might be the only one, am I?


Computer Projects and Ideas / XKCD reader for Windows
« on: January 19, 2013, 06:41:05 am »

I saw the xkcd widget for unix, and thought of making one for windows (I don't know if someone already has made one).

So here it is, features:
 - opens at last comic
 - browse like you would on the site (previous, next, random)
 - hover the image to get number & name of comic
 - click and hold image to move form
 - double click image to go to site
 - max width of 500px, max height of 400px

Sometimes it's needed to double click, since the comics might be big, and the image is not big enough in that case.

Closing has to be done with [alt][F4] because I thought it would disturb the layout if I added a close button or border in any way.


Other Calculators / [Lua] Cellular Automata
« on: January 15, 2013, 08:48:02 pm »
Cellular Automata;sa=view;down=843

This is an Nspire Lua version of Cellular Automata.

 - choose the fieldsize yourself
 - choose the number of generations that pass automatically (when it stops, you can go to the next gen with [enter]
 - choose the framerate at which the generations pass
 - toggle wraparound. When enabled, one row below the field's bottom row is the top row. That way with all the borders (The field never stops). When disabled, the field stops at the screenborders.
 - add standard states from a menu (glider, cross, Diagonal egg, Exploder, Dieing exploder r-Pentamino and Glidergun).
 - toggle tiles on the field using [tab] in edit mode

If you stop the animation with [esc] you go back to the starting positions.
Press [esc] again and you're back in the main menu. As long as you don't change the field size, all data is contained.
No saving option is implemented yet. When you quit the program, you lose the data.

11 sets of rules supported, select them, and many more options, with [menu].

Lua / [Lua] Rope Physics
« on: January 07, 2013, 03:01:53 pm »

Here is another video of a script I made today (I didn't really work long on it, so it's not really complete and useable) that i wanted to show you.
It is a rope physics script that can be downloaded below.

The video description tells more about it, everyone can use it if they want, feel free, but as I told you, it is not really working as it should be. For example the gravity seems to work perfectly as you look, but in the code it's a total mess :)

Other / TI-84+ mod
« on: January 05, 2013, 02:27:57 pm »
I was wondering if it would be a good idea to connect the +5V and GND of the usb connection of a TI-84+ to the battery + and -. I would place a switch inbetween ofcourse (in case of willing to use with batteries and usb). The batteries deliver 4.8-6V (rechargeable and non-rechargeable), so the 5V of the usb would be the perfect voltage. I'm not really sure though, since it might maybe somehow destroy something, and I don't want that.

The reason I want to change this is because I only use my 84+ on my desk near my pc, and not even often, just sometimes for some gametesting for the forum here. I don't use it enough, so everytime I want to use it I have to begin a giant quest to find the needed batteries for it. With the usb connected, i'd just have to connect it to my pc and get started...

Lua / [SOLVED] math.atan2() problem
« on: December 29, 2012, 05:57:05 am »

While working on my Uno game, I discovered something very strange.
I wanted to make an animation in which a card moves from one place to another, and therefore I need to determine the angle between the position is is now, and the position it has to travel to. To do this, I use math.atan2( xdifference, ydifference), which return an angle in radians.

When I let the computer software (runs OS 3.2) calculate everything works fine, and the card moves from the position it is to where it has to go, like it should.
Buut when I run exactly the same code, just transfered via usb, on my calc (nspire cx cas, os, it doesn't work. The angle it returns is about half the size of the one from the student software, while using exact the same calculations.

Am I not seeing something? Or is there some mess up with radians vs. degrees on software and calc?

Here's the code:
Code: [Select]
function TheGame:timer()
    local xDif = math.abs(self.movingCardPos[1]-self.defPos[1])
    local yDif = math.abs(self.movingCardPos[2]-self.defPos[2])
    local dirX = xDif/(self.movingCardPos[1]-self.defPos[1])
    if xDif<5 and yDif<5 then
        table.insert(self.pack, self.movingCard)
        self.movingCard = nil
        self.movingCardPos = nil
        local tan = math.atan2( yDif, xDif )
        if dirX>0 then
            self.movingCardPos[1] = self.movingCardPos[1]-4*math.cos(tan)
            self.movingCardPos[1] = self.movingCardPos[1]+4*math.cos(tan)
        self.movingCardPos[2] = self.movingCardPos[2]-4*math.sin(tan)

screenie pc:

screenie calc:

The number in the corner is the value returned by math.atan2(), of which you can see it differs

Solved: I had to update the screenSize after init, because that seems to return 0 at the beginning. Thanks Jim!!

TI-Nspire / Game selection help
« on: December 26, 2012, 06:07:10 pm »

I want to start making a game that is chosen from the community itself. Therefor I want you to make suggestions for a game I should make/port.
Any game is acceptable, but keep in mind that lua is limited. (no starcraft(-like), fps, high-framerate etc. stuff)

I hope some people will help me choose one, because i really want this one to finish (and i don't really have an idea of what kind of game the community wants).
As you may have noticed I am working on Uno right now, but once that's finished i'll get to this project.

To clarify, this project is for Nspire (Lua) only.
Everyone can give their ideas of course, I will add them to the idea-list beneath.


Idea list:
 - Reuben Quest: Ev Awakening
 - Zelda
 - [Decent] RPG
 - World's hardest game
 - Super Crate Box

TI-Nspire / [Lua] UNO (THE [card]game)
« on: December 26, 2012, 04:35:59 am »
Hi everyone

As you may have (or may not have) noticed I was gone for quite a while, about 6 months i guess. I came to visit now and then, but never actually reacted to something or made something new. But that's changed, 'cause I'm back in bussiness! I just had about enough of any calc related stuff for a while... but since I'm having exam stress right now, I needed something to relax, so I started a new program/game. You probably know it, it's the most famous/fun/hilarious/etc. cardgame existing, UNO!

I just started yesterday, but I suppose it's kinda finished, so I would ask you guys a favor to test it if you want. Any bugs/glitches/crashreporst may be posted here or in pm (thanks).
It's two version, a normal one and a small one. The images take up quite a lot of memory, so I made one with smaller images, and it runs slightly faster, but it's not as good looking as the normal one (the gameplay and code is exactly the same, just the images changed).

Here are some eye-candies:

the first one is from the normal version, the other ones are from the small version.

[.] move to next player (i did not let this go automatically because now you can follow what each player does --> you can think what cards are left)
[<][>] select card from own collection to lay down on pile
[enter] confirm card you want to lay down (there's a check to see if it is legit to lay that card, so no cheating should be possible)
[esc] another reset
[tab] take card from pack if you cannot lay down one that fits

edit: [enter] without any selection makes you skip, that is when you cannot lay any card that is legit.

also, the black bar indicates the player that is on the move.
And it has 3 AI's obviously, you are the one with the shown cards, the other ones pick their cards themselves.

Any questions, remarks, bugs, glitches may be posted :)


P.S. it feels good to be back, i missed it :)

Found bugs/mistakes/glitches:
 - Number 0 as card not available
 - Ndless loop when only one Player (AI) left

It seems like some people have different rules than the standard ones, if so, note them, i'll try to add them to a settings dialog
 - 2 of exact the same cards can be laid down at the same time
 - If another player lays down a card, you can lay down exactly the same one if you have it (even if it's not your turn)

Computer Projects and Ideas / [Contest] IRC quizzer bot
« on: August 05, 2012, 03:46:00 pm »

for the coding battle contest i'm gonna make an IRC bot that asks quiz questions once a day/hour or something (not sure of that yet, maybe every 8 hours to reach every time region).
everyone on the channel can participate, and the first one to answer the question will gain e.g. 10 points, and at the end of the month a final score will be calculated
the one with the most points wins of course.

i guess it can be fun, maybe not, we'll see :P


Other / Arduino's Game of Life
« on: July 15, 2012, 04:08:49 pm »

i know lot's of the people here are interested in more than only calculator development. So i decided to put a little more arduino stuff in here.
i recently bought a color screen for my arduino, the MI0283QT-2 from

it's a wonderful screen, resolution 320*240 with touch (resistive). and it runs quite smooth with the arduino.
now there's an example of conway's game of life, which you can see in the video.

i just wanted to show this, because it's lovely :) and i hope you like it...

btw, i did not make it myself, it's an example program from the manufacturer :)

Lua / [Contest] Osmos
« on: May 28, 2012, 02:55:56 pm »

I made this topic to present you the first stage of my 'Omnimaga Contest 2012: AI'-project.
Some of you may have already heard the (n/g)ame Osmos..

Osmos is a game in which you are a (life)cell and you have to complete several targets.
  • Become the biggest
  • absorb some special lifeforms
  • avoid some other special lifeforms
  • etc.

you are a dark blue cell, and live together with other creatures (cells). Some of them are nice, others try to destroy you, so watch out!
you can move by clicking 'behind' him. it gives you speed, but it also decreases your size, so you have to choose wisely..
Smaller normal cells are lighter blue, bigger normal cells are red. If a cell is bigger than you it absorbs you (and you obviously die), but if you can absorb a smaller cell you grow.

There are special lifeforms such as biophobias and other (forgot the names xp ), and those are special.
The biophobias are the only ones i implemented already, and they are those green cells. And this is where the AI comes in.
If you look closely, you can see the biophobia tries to escape from you if you are bigger than him, but he 'sees' the cells around him and absorbs the ones that are smaller.
This means he grows faster than the normal cells, so you'll have a hard time fighting them...

as you can see in the screenshot, i already reached a reasonable state after 2 days of working. But there are a lot of glitches and bad things in it though..
The AI has to be better, since it sometimes gets stuck between two big cells, and thus starts to shake between those 2 :)


Lua / troubles removing items from a table
« on: May 24, 2012, 03:00:59 pm »

i'm having trouble with a part of my code

1) a little bit of background information
I'm having a table filled with class instances, from the class cell. each instance has these values:
     - xPos
     - yPos
     - radius
     - xMov
     - yMov

2) every loop i want to remove all the cells with a radius of zero (so self.radius = 0)
as far as i know, i can't do this with a for loop, since removing items out of the table while working with the tablelength in a for loop messes up everything

here's the code

Code: [Select]
cell = class()
cellTable = {}


function cell:init(x,y,radius)
self.xPos = x
self.yPos = y
self.radius = radius
self.xMov = math.random(-1,1)
self.yMov = math.random(-1,1)

function on.create()
text = "no collision"

table.insert(cellTable, cell(10,10,10))
table.insert(cellTable, cell(100,90,20))
table.insert(cellTable, cell(69,200,10))
table.insert(cellTable, cell(180,50,10))
table.insert(cellTable, cell(150,150,10))

function on.timer()
for k,v in pairs(cellTable) do

function on.paint(gc)
for k,v in pairs(cellTable) do

function removeCells()
        --here's the part that should remove items out of the list

function checkCollision()
        --This function check for collisions (you don't say) and decreases or increases the radius when needed

this is only part of the code, but it's the part that matters (it's a school project i'm working on, and should not yet be made available till after the exams)

i hope i made pyself clear, and as always, any help would be greatly appreciated :)


Other / Virtual Arduino Screen
« on: April 05, 2012, 08:09:44 am »

I made a project for PC (windows only xs) that makes it possible to communicate with the Arduino. This might sound ordinairy, but i made it that way so you can draw on a "virtual" screen. With virtual i mean a screen that runs in a program on the PC. This makes it possible to test things out before trying them on real hardware, or you don't have a screen because it's too expensive or any other reason.

I know there's the serial monitor, but with this program you can draw strings, variables, rectangles, filled rectangles, ellipses, filled ellipses and lines on the screen, in color!
So if you're interested, more info can be found on

It is not finished yet, there are some things i'm not that happy with. Sometimes the screen flickers for no reason, and sometimes it gives an error xs but i'm working on it :)

Pages: [1] 2 3 4