In need of some assistance for BATMAN pov graphics
Moderators: Chuckt, Garth, bitfogav
-
- I practically live here!
- Posts: 372
- Joined: Fri Feb 18, 2011 4:24 am [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
Re: In need of some assistance for BATMAN pov graphics
Now theres an idea that just might work.
Thanks now to go ponder how to achieve results.
Thanks now to go ponder how to achieve results.
- brad
- Site Admin
- Posts: 2578
- Joined: Fri Mar 26, 2010 10:30 pm [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
Re: In need of some assistance for BATMAN pov graphics
I think if you had 4 sets of LED's you would be certainly getting close to something that would like quite nice (even at 5MPH?)
You would then need to have a hall effect sensor / switch on each led board, as each one passes the magnet, it would tell all LED boards to display their information. This is getting into something more advanced than any other POV I have made previously.
You need to make sure that they flash at just the right speed so that each 90 degree segment lines up with the next etc...
As for the code, I would start out with my one chip POV code and just keep building from there.
You would then need to have a hall effect sensor / switch on each led board, as each one passes the magnet, it would tell all LED boards to display their information. This is getting into something more advanced than any other POV I have made previously.
You need to make sure that they flash at just the right speed so that each 90 degree segment lines up with the next etc...
As for the code, I would start out with my one chip POV code and just keep building from there.
-
- I practically live here!
- Posts: 372
- Joined: Fri Feb 18, 2011 4:24 am [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
Re: In need of some assistance for BATMAN pov graphics
The one chip POV code is what I was referring to. I downloaded everything but finding the code is my problem.
- brad
- Site Admin
- Posts: 2578
- Joined: Fri Mar 26, 2010 10:30 pm [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
Re: In need of some assistance for BATMAN pov graphics
Sorry I should have mentioned that the POV graphic software that I made produces all the code for you depending on the graphic that you want to display
-
- I practically live here!
- Posts: 372
- Joined: Fri Feb 18, 2011 4:24 am [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
Re: In need of some assistance for BATMAN pov graphics
Going to scale back as the construction of the "Batmobile velomobile" has kinda come to a slow crawl as I need to get my workshop shelter done before snow flies. Plan now is to use my present built recumbent that has three wheels and add some led lighting.
Run some along fram and then using POV leds on the wheel spokes.
Trying to get my head around how to implement.
Have two magnets spaced 180 degrees apart. Time from magnet A to magnet B then use that as led on times.
Example lets say trigger from point A to point B = 10ms
then the pic turns on its graphic information for 20ms updates the time on then continues.
No real graphics just leds attached to spokes that light u in sequence according to data programed into the pic.
Need to figure out how to update time on.
Run some along fram and then using POV leds on the wheel spokes.
Trying to get my head around how to implement.
Have two magnets spaced 180 degrees apart. Time from magnet A to magnet B then use that as led on times.
Example lets say trigger from point A to point B = 10ms
then the pic turns on its graphic information for 20ms updates the time on then continues.
No real graphics just leds attached to spokes that light u in sequence according to data programed into the pic.
Need to figure out how to update time on.
- brad
- Site Admin
- Posts: 2578
- Joined: Fri Mar 26, 2010 10:30 pm [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
Re: In need of some assistance for BATMAN pov graphics
The two magnet idea would be a good idea - or perhaps you could instead have two seperate hall effect switches (it might be easier to line up the sensors on the spokes 180 degrees apart rather than magnets on the frame that are 180 degrees apart).
For a 50cm (20") wheel, you would need to be going very fast to get half a revolution taking 10mS.
I.E. 10mS x 2 = 20mS per revolution.
1/20mS = 50 Revolutions per second.
50 rps x 50cm = 25 metres per second = 1.5KM per minute = 90KM per hour, now that's a fast bike!
as a rough guess, you might be able to get 10 revs per second maybe? which would mean one revolution would be 100mS. If you had two strips of LED's then they would each draw 180 degrees of whatever is being drawn so that might come up with a bit of flicker, but certainly would be better than one strip.
So I guess this would update every 1/2 cycle which would give you 20fps. I'm just trying to think of the rough math behind getting the leds to update at the correct time.
I guess the hall effect sensors would go to an external interrupt and they would start a timer. You would then go by averaging to get an average Revs per second. I guess some trial and error is heading your way
For a 50cm (20") wheel, you would need to be going very fast to get half a revolution taking 10mS.
I.E. 10mS x 2 = 20mS per revolution.
1/20mS = 50 Revolutions per second.
50 rps x 50cm = 25 metres per second = 1.5KM per minute = 90KM per hour, now that's a fast bike!
as a rough guess, you might be able to get 10 revs per second maybe? which would mean one revolution would be 100mS. If you had two strips of LED's then they would each draw 180 degrees of whatever is being drawn so that might come up with a bit of flicker, but certainly would be better than one strip.
So I guess this would update every 1/2 cycle which would give you 20fps. I'm just trying to think of the rough math behind getting the leds to update at the correct time.
I guess the hall effect sensors would go to an external interrupt and they would start a timer. You would then go by averaging to get an average Revs per second. I guess some trial and error is heading your way
-
- I practically live here!
- Posts: 372
- Joined: Fri Feb 18, 2011 4:24 am [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
Re: In need of some assistance for BATMAN pov graphics
Been hacking at a snippet of code using a Tap-28 board and two switches. Basically a reaction type game. Curious about using the time from point A to point B (1/2 revolution) then multiply by 2 to get time for one revolution then use that variable for time on / code to display the bit data.
basically
if S1=1 and S2 = 0 then start count (a loop )
until S1 =0 and S2 = 1 (this will be the ON variable for displaying the bit data)
this is kinda where I have started my thinking.
S1 = 1 and S2 = 0 start count
S1 = 0 and S2 = 0 continue counting
S1 = 0 and S2 = 1 stop counting and use count as time to display bit data.
If the hall switches are near the center of the wheel then the wheel is basically smaller in diameter. The outside circumference has to move faster FPS than the center of the wheel. Want to install two hall switches on a wheel and experiment after I get the code working for timing the two switches. Time between presses. Got to start somewhere.
basically
if S1=1 and S2 = 0 then start count (a loop )
until S1 =0 and S2 = 1 (this will be the ON variable for displaying the bit data)
this is kinda where I have started my thinking.
S1 = 1 and S2 = 0 start count
S1 = 0 and S2 = 0 continue counting
S1 = 0 and S2 = 1 stop counting and use count as time to display bit data.
If the hall switches are near the center of the wheel then the wheel is basically smaller in diameter. The outside circumference has to move faster FPS than the center of the wheel. Want to install two hall switches on a wheel and experiment after I get the code working for timing the two switches. Time between presses. Got to start somewhere.
-
- I practically live here!
- Posts: 372
- Joined: Fri Feb 18, 2011 4:24 am [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
Re: In need of some assistance for BATMAN pov graphics
Making lots of progress now how to implement?? Using software uart so the ICSP is utilized for the UART. Not perfect but it is getting the time between presses but not resetting correctly.
Code: Select all
{
*****************************************************************************
* Name : UNTITLED.BAS *
* Author : [select VIEW...EDITOR OPTIONS] *
* Notice : Copyright (c) 2013 [select VIEW...EDITOR OPTIONS] *
* : All Rights Reserved *
* Date : 10/08/2013 *
* Version : 1.0 *
* Notes : testing of trigget timing *
* : *
*****************************************************************************
}
Device = 18F2420
Clock = 8
Include "convert.bas"
Include"suart.bas"
Include"InternalOscillator.bas"
Dim R_un As Word
Dim led1 As PORTA.5
Dim led2 As PORTB.3
Dim count As Word
Dim s1 As PORTB.5
Dim s2 As PORTB.4
dim Trigger as word
UART.SetBaudrate(sbr9600)
UART.SetMode(umTrue)
UART.SetTX(PORTB.7) ' matches the PICkit 2 UART tool input pin when connected to the ICSP connector
Output (led1)
Output(led2)
led1=1
led2 = 1
input (S1)
input (S2)
R_un = 0
While 1 = 1
if S1 = 1 and R_un <1 then ' waiting for button press
delayms(100) 'switch debounce
R_un = 0
end if
If s1 = 0 and S2 = 1 Then ' button press
delayms(100) 'switch debounce
R_un = R_un + 1 'count time between pressing of S1 and S2
Low (led1) ' led1 is on
UART.Write("run =",DecToStr(R_un), 13, 10)
end if
if S1 = 1 and S2 = 1 then ' time between pressing S1 and S2 no button press
delayms(100) 'switch debounce
R_un = R_un +1 ' continue counting tiome between press of S1 and S2
end if
if S2 = 0 then Trigger = R_un ' S2 is pressed
delayms(100) 'switch debounce
UART.Write("Trigger =",DecToStr(Trigger), 13, 10)
Toggle (led1) ' turn off led1
low (led2) ' turn on led2
delayms(500)
toggle (led2) 'led2 off
R_un = 0 ' reset timer R_un
End If
UART.Write("run =",DecToStr(R_un), 13, 10)
'UART.Write("I like pizza", 13, 10)
'DelayMS(1000)
Wend
-
- I practically live here!
- Posts: 372
- Joined: Fri Feb 18, 2011 4:24 am [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
Re: In need of some assistance for BATMAN pov graphics
This code appears to work, just needs some TLC. Looks familiar i'm sure? This works so I need to figure out how to utilize in a POV display on a slow rotating wheel.
Code: Select all
{
*****************************************************************************
* Name : UNTITLED.BAS *
* Author : [select VIEW...EDITOR OPTIONS] *
* Notice : Copyright (c) 2013 [select VIEW...EDITOR OPTIONS] *
* : All Rights Reserved *
* Date : 10/08/2013 *
* Version : 1.0 *
* Notes : testing of trigget timing *
* : *
*****************************************************************************
}
Device = 18F2420
Clock = 8
Include "convert.bas"
Include"suart.bas"
Include"InternalOscillator.bas"
Dim R_un As Word
Dim led1 As PORTA.5
Dim led2 As PORTB.3
Dim count As Word
Dim s1 As PORTB.4
Dim s2 As PORTB.5
Dim Trigger As Word
Dim mode As Byte ' sequence of events
Dim button_1 As Byte ' S1
Dim button_2 As Byte ' S2
Dim sensor_delay As Byte ' debounce
Sub check_buttons()
If mode = 0 And s1 = 1 And s2 = 1 Then mode = 1 ' waiting for button press
DelayMS(100) 'switch debounce
R_un = 0
End If
'xxxxxxxxxxxx
' START COUNTING TIME BETWEEN BUTTON PRESSES
If mode = 1 And s1 = 0 And s2 = 1 Then mode = 2 ' S1 button press start count
DelayMS(100) 'switch debounce
End If
'xxxxxxxxxxxxxxx
'zzzzzzzzzzzz
' STOP COUNTING INTERVAL
Trigger = R_un
If mode = 2 And s1 = 1 And s2 = 0 Then mode = 3 ' time between pressing S1 and S2 no button press
DelayMS(100) 'switch debounce
End If
If mode = 3 And s1 = 1 And s2 = 1 Then mode = 0
End If
End Sub
'zzzzzzzzzzzzzzzz
Sub increment_timer()
If mode = 0 Then R_un = 0
End If
If mode = 2 Then Inc (R_un)
End If
End Sub
Sub display()
UART.Write("timer =",DecToStr(R_un), 13, 10)
delayms(500)
UART.Write("mode =",DecToStr(mode), 13, 10)
End Sub
UART.SetBaudrate(sbr9600)
UART.SetMode(umTrue)
UART.SetTX(PORTB.7) ' matches the PICkit 2 UART tool input pin when connected to the ICSP connector
Output (led1)
Output(led2)
led1=1
led2 = 1
Input (s1)
Input (s2)
R_un = 0
mode = 0
While 1 = 1
check_buttons
increment_timer
display
Wend
- brad
- Site Admin
- Posts: 2578
- Joined: Fri Mar 26, 2010 10:30 pm [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
Re: In need of some assistance for BATMAN pov graphics
Are you able to post some of the serial terminal output?
-
- I practically live here!
- Posts: 372
- Joined: Fri Feb 18, 2011 4:24 am [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
Re: In need of some assistance for BATMAN pov graphics
I can use PRINT SCREEN etc unless there is a better method. Maybe save to a file??
Am at the point of wondering what do I do with it now?
Not sure of direction to go. Basically have elapsed time between button presses (hall switches upon completion) and contemplating connecting a 8 x 8 matrix or similar for testing but ??? should perhaps have a wheel with rotating leds??
Am at the point of wondering what do I do with it now?
Not sure of direction to go. Basically have elapsed time between button presses (hall switches upon completion) and contemplating connecting a 8 x 8 matrix or similar for testing but ??? should perhaps have a wheel with rotating leds??
Re: In need of some assistance for BATMAN pov graphics
Can't you copy the serial output window text and post it here in a "quote" or "code" segment?, that will give me and Brad a better idea of what your code is trying to achieve..
adding a 8 x 8 matrix will only complicate things I think..
Example:
adding a 8 x 8 matrix will only complicate things I think..
Example:
Ortimer =
mode =
Code: Select all
timer =
mode =
If you don't know what Voltage your country is using, you shouldn't be doing electronics
-
- I practically live here!
- Posts: 372
- Joined: Fri Feb 18, 2011 4:24 am [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
Re: In need of some assistance for BATMAN pov graphics
I found by experimention that if I log to a file then open I can then paste the read out.
When the mode changes that indicates a button press.
When the mode changes that indicates a button press.
Code: Select all
mode =1
timer =0
mode =1
timer =0
mode =1
timer =0
mode =1
timer =0
mode =1
timer =0
mode =1
timer =0
mode =1
timer =0
mode =1
timer =0
mode =1
timer =0
mode =1
timer =0
mode =1
timer =0
mode =1
timer =0
mode =1
timer =0
mode =1
timer =0
mode =1
timer =1
mode =2
timer =2
mode =2
timer =3
mode =2
timer =4
mode =2
timer =5
mode =2
timer =6
mode =2
timer =7
mode =2
timer =7
mode =3
timer =0
mode =0
timer =0
mode =1
timer =0
mode =1
timer =0
mode =1
timer =1
mode =2
timer =2
mode =2
timer =3
mode =2
timer =4
mode =2
timer =5
mode =2
timer =6
mode =2
timer =6
mode =3
timer =0
mode =0
timer =0
mode =1
timer =0
mode =1
timer =0
mode =1
timer =0
mode =1
timer =0
mode =1
timer =0
mode =1
timer =0
mode =1
timer =0
mode =1
timer =0
mode =1
timer =0
mode =1
timer =0
- brad
- Site Admin
- Posts: 2578
- Joined: Fri Mar 26, 2010 10:30 pm [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
Re: In need of some assistance for BATMAN pov graphics
I am finding it a little difficult to follow exactly what you're trying to do with the code unfortunately.
A few things I will throw in here though is that you would probably not want to use delays for your switch de-bounce, because this locks up the entire microcontroller.
I would start out nice and simple for your POV. Just start with maybe eight single color LED's connected to a single output port. see about getting it to display a simple message (maybe a attach it to a bike wheel and have the bike upside down.) you could then rotate the wheel at different speeds and experiment with code to make sure the image stays right where it is regardless of the speed of rotation.
A few things I will throw in here though is that you would probably not want to use delays for your switch de-bounce, because this locks up the entire microcontroller.
I would start out nice and simple for your POV. Just start with maybe eight single color LED's connected to a single output port. see about getting it to display a simple message (maybe a attach it to a bike wheel and have the bike upside down.) you could then rotate the wheel at different speeds and experiment with code to make sure the image stays right where it is regardless of the speed of rotation.
-
- I practically live here!
- Posts: 372
- Joined: Fri Feb 18, 2011 4:24 am [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
Re: In need of some assistance for BATMAN pov graphics
I put the delays so I could see results. Tried taking all the delays out and the USB readout shows nothing.
Still contemplating where to go with this.
Still contemplating where to go with this.
Who is online
Users browsing this forum: No registered users and 0 guests