Menu

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.

Show posts Menu

Messages - Hemlos

#1546
I was reading some of the information on the link you sent....
If channel 1 is an analog input(you must verify this and make the change yourself if it isnt), so im pretty sure you need a stream of data to make the DAC light up.

Issues with current code:
1. ic chips are turned on or off with 1 or 0, 15 might be an issue and might be a grey result.
2. analog is a continuous stream of data, chips read this as on or off, depending on the output.  If it is on or 1, then then chip is recieving 3.5 volts-5.0 volts. If it is off, the analog stream shows as,  0 volts-1.0 volts.  Being an electronics technician i can assure you of this.

So, Sending one small burst of infomation in one frame is not a sufficient for analog, this is fine for digital if it has a memory remembering the last input.
Furthermore, When a digital input is neither on or off, it is actually sending 1.1 volts-3.4 volts, resulting in the "grey" area of an ic chip...no output is resulted in the ic.

Thus, try this altered code, theoretically it should light the led for channel 1, for 5 minutes:
NOTE: i changed the output data to 1...this is ON status, 0 will be OFF, and anything else is "grey"

Code (glbasic) Select
limitfps 60  //used to limit frames persecond to allow 5 minute send
port = 1
chip_no = 1
data =1   //original code was 15; data output to an LED should be on or off...1 or 0
a=1  //start numeral of a 5 minute delay

Start_K8000 ()
SelectI2CprinterPort (port)  //*SELECT lpt1 on mainboard
ClearIOchip (chip_no)          //*clear channels 1
ConfigIOchipAsOutput (chip_no) //*configure channels 1 AS outputs

while a<18000  //loop here for 5 minute output stream
a=a+1
IOoutput (Chip_no, Data)        // send data
PRINT "SENDING #: "+a,100,100
SHOWSCREEN
wend

PRINT "sent data",100,100
SHOWSCREEN
MOUSEWAIT

Stop_K8000()                    //stop after use
PRINT "stopped",120,120
SHOWSCREEN
MOUSEWAIT

END
That should work...but if it doesnt try this(this has more information per frame to the chip):
Code (glbasic) Select
limitfps 60  //used to limit frames persecond to allow 5 minute send
port = 1
chip_no = 1
data =1   //original code was 15; data output to an LED should be on or off...1 or 0
a=1  //start numeral of a 5 minute delay


Start_K8000 ()

while a<18000  //loop here for 5 minute output stream
a=a+1
SelectI2CprinterPort (port)  //*SELECT lpt1 on mainboard
ClearIOchip (chip_no)          //*clear channels 1
ConfigIOchipAsOutput (chip_no) //*configure channels 1 AS outputs
IOoutput (Chip_no, Data)        // send data
PRINT "SENDING #: "+a,100,100
SHOWSCREEN
wend

PRINT "sent data",100,100
SHOWSCREEN
MOUSEWAIT

Stop_K8000()                    //stop after use
PRINT "stopped",120,120
SHOWSCREEN
MOUSEWAIT

END
PS:
 im reading the information in the code they have available, if i see any indescreptancies with my above code ill edit this particular code above, and ill make note below that it was altered with a timestamp...so check this thread again to see if i edited this section if i found something.

PPS. if it still doesnt work, try changing the channels, in the case this might only work for digital, as opposed to analog input.

Quotenote: this topic has extended to page 2, this is the last post on page 1, anymore replies pushes this topic onto page 2.
-
#1547
The number of surfaces is expensive too, if youre using extremely highly detailed and ultra subdivided faces to make an object look very smooth, itll drag it down too.

Ad a code to detect the number of surfaces so you can limit the detail of your 3d objects.
#1548
Where ani1 originally starts as 0
ani1=1-ani1=1
Then it loops:
1-ani1=0
1-ani1=1
1-ani1=0
1-ani1=1

etc
it will always equal 1 or 0 with that algrithm

try this instead:

 // witch ani
    WHILE TRUE
    delta=delta+1
    IF delta>100
        ani1=ani1+1
        if ani1>3 then ani1=0
        delta=0
    ENDIF

first frame will equal 0
then 1 then 2 then 3 then 0 etc
#1549
GLBasic - en / New Update
2006-Nov-10
Yes, the newest version 4.001 must be downloaded from the website.
#1550
3D-snippets / X_MULTMATRIX
2006-Nov-07
interesting, and doesnt gimbal lock..but it rotates like x_rotation still, minus the gimbal..

This method works with 2 axes that are fixed to the world and one to the object.
#1551
I think either something is very wrong with x_mult or i am totally not using it how it is intended..

anything i do causes the object in question to get stretched out like a rubberband.
#1552
The object renders fine with this:
Code (glbasic) Select
mult[0]=1
mult[1]=0
mult[2]=0
mult[3]=0
mult[4]=0
mult[5]=1
mult[6]=0
mult[7]=0
mult[8]=0
mult[9]=0
mult[10]=1
mult[11]=0
mult[12]=0
mult[13]=0
mult[14]=0
mult[15]=1
X_MULTMATRIX mult[]
This obliterates the object stretching it out to infinity:
Code (glbasic) Select
mult[0]=1
mult[1]=0
mult[2]=0
mult[3]=90
mult[4]=0
mult[5]=1
mult[6]=0
mult[7]=0
mult[8]=0
mult[9]=0
mult[10]=1
mult[11]=0
mult[12]=0
mult[13]=0
mult[14]=0
mult[15]=1
X_MULTMATRIX mult[]
Am i not using this correctly?
#1553
3D-snippets / X_MULTMATRIX
2006-Nov-06
Code (glbasic) Select
DIM mat[16]
mat[0..3] = forward (local x-axis) (x,y,z,0)
mat[4..7] = local up (x,y,z,0)
mat[8..11]=local right (x,y,z,0)
mat[12..16]=translation (offset) from origin (x,y,z,1)

X_MULTMATRIX mat[]
If you want to use X_ROTATION and stuff, too - use the X_PUSHMATRIX before X_MULTMATRIX.

*quoted from gernot*

QuoteNote from Hemlos:
Im currently working with this new command and will update this in more detail as i get more information.
#1554
ok.
this replaces rotation and movment or are rotation and movment still needed?
#1555
I dont undrstand the format for x_multmatrix in the bubble help,
how is it used?
#1556
correct me if im wrong, but i do believe it is md2

glbasic has the ability to create slerps tho.

quaterions would be nice :)

theoretically quaterions can be done with inline or even written into gl code...but im not positive about it...

if youre feeling brave....check out gamasutra for the slerp euler and quaterion code conversions.
#1557
Awesome, that piece of electronic is called a DAC mechanism! Direct Acces Control.
Ive seen them used before with the original BASIC on some very old computers for robots.

Ive been wanting to build my own DAC but i couldnt figgure out how to get glbasic to write to the indivual pins of a printer port.
#1558
GLBasic - en / Dynamics?
2006-Nov-03
i like the idea of joints(nodes)

does it do quat rotations too? :)
#1559
forgot where this thread went,

hmm, you added phsyics to hide the gimbal lock, very funny joke of yours. haha

The solution is actually going to be far more sophisticated.
What needs to be added is a quatrion conversion algorithm to input the rotation angles to the x_rotation. This eliminates gimbal lock and all 3 control axis will freely control thier respective axis.
It might be a while before i figgure out how to add that stuff with inline command from gamasutra..i have no idea what im doing with that.
-hem
#1560
The only time Pink aliasing is a problem is if the image was originally created using true pink for the background ON THE SAME LAYER, thus pixels fading into a an edge retain a pink shade. You can try to use layers of color in more advanced image software, like paint shop pro, but make sure you save it to the correct bmp format. MSPaint will create the proper format if you open and save it in there. You can also make sure your background color is the right shade of pink with the easy color tool.

Quote1 .Typically what i do when i want an image with special edges..i use a black background in my image program.

2. next i apply my special effects to the images

3. i select and copy everything that isnt black..if theres a hole...i fill it.

4. then afterwards i open mspaint(easy to use colors) and paste the work onto the pink background.
This produces images with no pink antialiasing on one layer.
The idea is to separate your image from the pink background while you are working on it, and aftwerwards put it onto a pink background.