DMX Controller

Post here to let others know of a project you're working on.

Moderators: Chuckt, Garth, bitfogav

User avatar
brad
Site Admin
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: DMX Controller

Post by brad » Sat Mar 12, 2011 4:53 pm

That's right, now I remember your other post!

I remember commenting on how perfect your boards look, mine don't come out quite so nice...

User avatar
bitfogav
Moderator
Moderator
Posts: 915
Joined: Sun Mar 28, 2010 9:03 pm
Location: United Kingdom
Contact:

Re: DMX Controller

Post by bitfogav » Sun Mar 13, 2011 10:28 am

brad wrote: I remember commenting on how perfect your boards look, mine don't come out quite so nice...
Yeah come to think about it you did comment about how my boards look Brad, thank you for the grateful comments.
I guess it comes from the amount of time I spend on them or shall I say Diptrace? lol. as for the pcb I just use press&peel and making sure the iron is on max heat, press it for a few mins and then wait for it to cool down before removing the press&peel top cover.

sum more pics to share:
dmxconsole1.jpg
dmxconsole1.jpg (19.06 KiB) Viewed 19525 times
LCD display just shows some testing values :)
dmxconsole2.jpg
dmxconsole2.jpg (47.53 KiB) Viewed 19525 times
Making all them wires with header connectors took awhile aswell lol.

User avatar
brad
Site Admin
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: DMX Controller

Post by brad » Mon Mar 14, 2011 8:49 am

Very professional!

Do you think there would be a market for you to sell these?

User avatar
bitfogav
Moderator
Moderator
Posts: 915
Joined: Sun Mar 28, 2010 9:03 pm
Location: United Kingdom
Contact:

Re: DMX Controller

Post by bitfogav » Mon Mar 14, 2011 9:36 am

brad wrote:Very professional!

Do you think there would be a market for you to sell these?
Well I dont really know to be honest Brad?, theres alot of DMX Controllers around, and this is just something I fabricated and programmed myself, giving me many hours of fun!. I guess I could make it an open source DMX Controller?, I could add a Bootloader and then use the USB connector to upload the user programmes? I dont think theres many of those on the market?. :)

Heres a pic of the back of my controller, ICSP socket, USB, Power, power led.
dmxcontback.jpg
dmxcontback.jpg (11.67 KiB) Viewed 19521 times

Heres some DMX controllers on the market:
dmxcont1.jpg
dmxcont1.jpg (18.07 KiB) Viewed 19521 times
dmxcont2.jpg
dmxcont2.jpg (17.19 KiB) Viewed 19521 times

User avatar
brad
Site Admin
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: DMX Controller

Post by brad » Wed Mar 16, 2011 9:57 pm

Maye you could put It on that website that chuck showed where you tell people about your projects and they them back it with money. You then send them each one when you have completed it.

User avatar
bitfogav
Moderator
Moderator
Posts: 915
Joined: Sun Mar 28, 2010 9:03 pm
Location: United Kingdom
Contact:

Re: DMX Controller

Post by bitfogav » Thu Mar 17, 2011 12:14 am

brad wrote:Maye you could put It on that website that chuck showed where you tell people about your projects and they them back it with money. You then send them each one when you have completed it.

Yeah that sounds like a good idea :)

Link to that site is here:http://www.kickstarter.com/start

User avatar
brad
Site Admin
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: DMX Controller

Post by brad » Thu Mar 17, 2011 7:54 pm

Thanks for the link!

User avatar
bitfogav
Moderator
Moderator
Posts: 915
Joined: Sun Mar 28, 2010 9:03 pm
Location: United Kingdom
Contact:

Re: DMX Controller

Post by bitfogav » Sun Mar 20, 2011 3:34 am

Heres first release of my DMX Console Code, not included the Swordfish Modules I have created to support it :)

Code: Select all

//
//-------------------------------------------------------------------------
// Main Programme for Bitfogav's  DMX Controller Console
//
//   Swordfish basic (requires V2.2.0.6 or higher)
//
//                                                    
//          - author: Gavin Wiggett                                                                                                                                      
//          - date:    24/02/2011                                                     
//  Version  1.0                                                            
//  Notes                                        
//        DMX Controller using a 18f4550 at 48mhz             
//          USB equipped for future add ons
//            DMX TX Pin = user optional (default portb.0)
//              IMPORTANT - DMX_TX Pin is tied together with usart TX pin
//-------------------------------------------------------------------------
//

// Device and Clock
Device = 18f4550
Clock = 48

// LCD optional settings      
#option LCD_DATA = PORTD.4          // LCD setup data port (sets it to 4 data lines only)
#option LCD_RS = PORTE.2          
#option LCD_EN = PORTE.1

// DMX_TX optional settings
#option dmxTx_Pin = PORTD.3         // DMX_TX set output pin for dmx (transmitter)

// Modules
Include "LCD.bas"
Include "ADC.bas"
Include "convert.bas" 
Include "DMX_TX.bas"
Include "RandGen2.bas"  
Include "Setup_bsp.bas"

// Main Variables    
Dim barrelSpeed As Byte,
    barrelPos As Byte,
    range As Byte,
    colourChanger As ShortInt,
    i As Word
// Gobo colours setup  
Dim colourValue, colour, white, red, multi, magenta, green, yellow, blue, pink, cyan As Byte 
Dim resetValue As Byte          // store dmx channel reset value
Dim beatCounter As Byte         // beat counter and delay
Dim beatDelay As Byte
Dim noBeat As Word
Dim fakeBeat As Word
Dim BPM_Interval As Word
Dim BPM_approx As Byte
Dim trueBeat_Flag As Bit
Dim j As Word
Dim secondBeat As Boolean
Dim function_value As Word      // ADC function data    
Dim button_1,                   // button booleans
    button_2,
    button_3 As Boolean
Dim menu_cycle As Byte          // menu selections
Dim CHfunction As ShortInt
Dim CHfunctionLCD As Byte
Dim buttonDelay,                // button debounce 
    buttonDebounce As Byte 


// Subroutines ==================================

// Delay for beat detection and no beat detected
Sub beat_delay ()
    If beatDelay <> 0 Then
        Dec(beatDelay)
    EndIf
    If noBeat <> 0 Then
        Dec(noBeat)
    EndIf
End Sub 

// get ADC value from AN0
Function Get_ADC_Value () As Word     // Function to get the ADC value    
    result = ADC.Read(0)              // Get ADC value from channel 0   
    result = result / 4               // Scale the answer down by a factor of 4 (0 to 255) 
End Function

// check our Button Booleans
Sub checkButtons ()
    If buttonDelay = 0 Then
        // button 1
        If button1 = 0 Then 
             If button_1 = true Then
                button_1 = false
             Else 
                button_1 = true
             EndIf
         buttonDelay = buttonDebounce       // need to debounce button
        EndIf
    
        // button 3
        If button3 = 0 Then 
            If button_3 = true Then
               button_3 = false
            Else 
               button_3 = true
            EndIf
         buttonDelay = buttonDebounce       // need to debounce button
        EndIf 
        
    ElseIf buttonDelay <> 0 Then
        Dec(buttonDelay)            // decrease Delay for Button Debounce
    EndIf
    
End Sub

Sub lcd_Update ()
        // Check for menu button press
        If button4 = 0 And buttonDelay = 0 Then
            Inc(menu_cycle)           
            If menu_cycle = 4 Then
                menu_cycle = 0
            EndIf
            buttonDelay = buttonDebounce    // need to debounce button
            LCD.Cls                         // clear LCD Display
        EndIf
        // Update the LCD Display
        Select menu_cycle
            Case 0
        LCD.WriteAt(1,1,"DMX Console")
        LCD.WriteAt(2,1," Prototype v1.0")   
        LCD.WriteAt(3,1,"  by bitfogav 2011")
        LCD.WriteAt(4,1,"Beat= ",DecToStr(beatCounter,3),"   BPM= ",DecToStr(BPM_approx,3))
            Case 1
        LCD.WriteAt(1,1,"CH1 = ",DecToStr(DMX_TX.DMX_Channel(0),3),"  CH5 = ",DecToStr(DMX_TX.DMX_Channel(4),3))
        LCD.WriteAt(2,1,"CH2 = ",DecToStr(DMX_TX.DMX_Channel(1),3),"  CH6 = ",DecToStr(DMX_TX.DMX_Channel(5),3))   
        LCD.WriteAt(3,1,"CH3 = ",DecToStr(DMX_TX.DMX_Channel(2),3),"  CH7 = ",DecToStr(DMX_TX.DMX_Channel(6),3))
        LCD.WriteAt(4,1,"CH4 = ",DecToStr(DMX_TX.DMX_Channel(3),3),"  CH8 = ",DecToStr(DMX_TX.DMX_Channel(7),3))
            Case 2
        LCD.WriteAt(1,1,"Analog = ",DecToStr(function_value,3))
        LCD.WriteAt(2,1,"Fast mode = ",DecToStr(button_3))
        
              // approx delay times depending on clock speed (no timers are used)  
               If  fakeBeat = 629 Then '5 sec delay
                   LCD.WriteAt(3,1,"nobeat timer =  5sec")                
               ElseIf   fakeBeat = 1257 Then '10 sec delay
                        LCD.WriteAt(3,1,"nobeat timer = 10sec")                
               ElseIf   fakeBeat = 1886 Then '15 sec delay
                        LCD.WriteAt(3,1,"nobeat timer = 15sec")                
               ElseIf   fakeBeat = 2515 Then '20 sec delay
                        LCD.WriteAt(3,1,"nobeat timer = 20sec") 
               ElseIf   fakeBeat = 3144 Then '25 sec delay
                        LCD.WriteAt(3,1,"nobeat timer = 25sec")                
               ElseIf   fakeBeat = 3773 Then '30 sec delay
                        LCD.WriteAt(3,1,"nobeat timer = 30sec")                  
               EndIf         
        LCD.WriteAt(4,1,"Beat = ",DecToStr(beatCounter,3))  
            Case 3
        LCD.WriteAt(1,1,"noBeat = ",DecToStr(noBeat,4))
        LCD.WriteAt(2,1,"BPM Value = ",DecToStr(BPM_Interval,4))   
        LCD.WriteAt(3,1,"BPM = ",DecToStr(BPM_approx,3))
        LCD.WriteAt(4,1,"Beat = ",DecToStr(beatCounter,3)) 
        End Select
End Sub

Sub checkColourButton()
     // button5 changes color randomly and resets our colour changer
     If button5 = 0 And buttonDelay = 0 Then
            RandGen2.SetRndMax(8)         // set MAX random gen value 
            colour = RandGen2.rand ()     // Get a random number
                Select colour
                    Case 0                            //
                        colourValue = white           //
                    Case 1                            //
                        colourValue = red             //
                    Case 2                            //
                        colourValue = multi           //
                    Case 3                            // 
                        colourValue = magenta         //
                    Case 4                            //  Select which colour to display 
                        colourValue = green           //
                    Case 5                            //
                        colourValue = yellow          //
                    Case 6                            //
                        colourValue = blue            //
                    Case 7                            //
                        colourValue = pink            //
                    Case 8                            //
                        colourValue = cyan
                End Select              
                colourChanger = 15                     // reset our colour changer value 
                DMX_TX.DMX_Channel(2) = colourValue    // set dmx channel 3 to colour value
                buttonDelay = buttonDebounce           // need to debounce button
    EndIf
End Sub  

Sub CHfunctionTest()         // to test 16 channels using the pot to set values
    
    buttonDelay = buttonDebounce    // need to debounce button
    
    While (button8 = 1)             // exit button not pressed (Exit when pressed)
            
        function_value = Get_ADC_Value  // get our ADC value from channel 1
        
        If button7 = 0 And buttonDelay = 0 And CHfunction >= 0 Then    
            Inc(CHfunction)
            buttonDelay = buttonDebounce    // need to debounce button
        EndIf

        If button6 = 0 And buttonDelay = 0 And CHfunction <= 15 Then
            Dec(CHfunction)
            buttonDelay = buttonDebounce    // need to debounce button
        EndIf    
    
        If CHfunction >= 16 Then
            CHfunction = 0
        ElseIf CHfunction <= -1 Then
            CHfunction = 15
        EndIf
        
        // adjust channel according to CHfunction value
        Select CHfunction
            Case 0
            DMX_TX.DMX_Channel(0) = function_value
            Case 1
            DMX_TX.DMX_Channel(1) = function_value
            Case 2
            DMX_TX.DMX_Channel(2) = function_value            
            Case 3
            DMX_TX.DMX_Channel(3) = function_value  
            Case 4
            DMX_TX.DMX_Channel(4) = function_value
            Case 5
            DMX_TX.DMX_Channel(5) = function_value
            Case 6
            DMX_TX.DMX_Channel(6) = function_value            
            Case 7
            DMX_TX.DMX_Channel(7) = function_value 
            Case 8
            DMX_TX.DMX_Channel(8) = function_value
            Case 9
            DMX_TX.DMX_Channel(9) = function_value
            Case 10
            DMX_TX.DMX_Channel(10) = function_value            
            Case 11
            DMX_TX.DMX_Channel(11) = function_value  
            Case 12
            DMX_TX.DMX_Channel(12) = function_value
            Case 13
            DMX_TX.DMX_Channel(13) = function_value
            Case 14
            DMX_TX.DMX_Channel(14) = function_value            
            Case 15
            DMX_TX.DMX_Channel(15) = function_value          
        End Select

        If CHfunction >= 0 And CHfunction <= 7 Then
            CHfunctionLCD = 0
        Else
            CHfunctionLCD = 1
        EndIf
        
        Select CHfunctionLCD
        Case 0
        LCD.WriteAt(1,1,"CH1 = ",DecToStr(DMX_TX.DMX_Channel(0),3),"  CH5 = ",DecToStr(DMX_TX.DMX_Channel(4),3))
        LCD.WriteAt(2,1,"CH2 = ",DecToStr(DMX_TX.DMX_Channel(1),3),"  CH6 = ",DecToStr(DMX_TX.DMX_Channel(5),3))   
        LCD.WriteAt(3,1,"CH3 = ",DecToStr(DMX_TX.DMX_Channel(2),3),"  CH7 = ",DecToStr(DMX_TX.DMX_Channel(6),3))
        LCD.WriteAt(4,1,"CH4 = ",DecToStr(DMX_TX.DMX_Channel(3),3),"  CH8 = ",DecToStr(DMX_TX.DMX_Channel(7),3))
        Case 1
        LCD.WriteAt(1,1,"CH9 = ",DecToStr(DMX_TX.DMX_Channel(8),3)," CH13 = ",DecToStr(DMX_TX.DMX_Channel(12),3))
        LCD.WriteAt(2,1,"CH10= ",DecToStr(DMX_TX.DMX_Channel(9),3)," CH14 = ",DecToStr(DMX_TX.DMX_Channel(13),3))   
        LCD.WriteAt(3,1,"CH11= ",DecToStr(DMX_TX.DMX_Channel(10),3)," CH15 = ",DecToStr(DMX_TX.DMX_Channel(14),3))
        LCD.WriteAt(4,1,"CH12= ",DecToStr(DMX_TX.DMX_Channel(11),3)," CH16 = ",DecToStr(DMX_TX.DMX_Channel(15),3))
        End Select
    
        If buttonDelay <> 0 Then
            Dec(buttonDelay)            // decrease Delay for Button Debounce
        EndIf  
        // Transmit all DMX packets
        DMX_TX.DMX_Packets   
    Wend
     LCD.Cls    // clear LCD
     buttonDelay = buttonDebounce       // need to debounce button
End Sub 

Sub nobeatTimer()                       // no beat timer (if no beat then make fake beat)
    buttonDelay = buttonDebounce        // need to debounce button
    noBeat  = 1                         // clear noBeat timer
    DelayMS(200)                        // debounce buttons
    LCD.Cls                             // clear LCD display
        While (button8 = 1)             // exit button not pressed (Exit when pressed)

            If button7 = 0 And buttonDelay = 0 And noBeat >= 1 Then    
                Inc(noBeat)
                buttonDelay = 190    // need to debounce button
            EndIf

            If button6 = 0 And buttonDelay = 0 And noBeat <= 6 Then
                Dec(noBeat)
                buttonDelay = 190    // need to debounce button
            EndIf
            
                    If noBeat >= 7 Then
                        noBeat = 1
                    ElseIf noBeat <= 0 Then
                        noBeat = 6
                    EndIf
        
            Select noBeat       // approx delay times depending on clock speed (no timers are used)
                Case 1          // 5 sec delay
                    fakeBeat = 629  '5 sec delay
                    LCD.WriteAt(1,1,"nobeat timer =  5sec")                
                Case 2          // 10 sec delay
                    fakeBeat = 1257  '10 sec delay
                    LCD.WriteAt(1,1,"nobeat timer = 10sec")                
                Case 3          // 15 sec delay
                    fakeBeat = 1886  '15 sec delay
                    LCD.WriteAt(1,1,"nobeat timer = 15sec")                
                Case 4          // 20 sec delay
                    fakeBeat = 2515  '20 sec delay
                    LCD.WriteAt(1,1,"nobeat timer = 20sec") 
                Case 5          // 25 sec delay
                    fakeBeat = 3144  '25 sec delay
                    LCD.WriteAt(1,1,"nobeat timer = 25sec")                
                Case 6          // 30 sec delay
                    fakeBeat = 3773  '30 sec delay
                    LCD.WriteAt(1,1,"nobeat timer = 30sec")                  
            End Select


            If buttonDelay <> 0 Then
                Dec(buttonDelay)            // decrease Delay for Button Debounce
            EndIf 

        // Transmit all DMX packets  (make sure we keep sending dmx packets)
        DMX_TX.DMX_Packets
        
        Wend
            noBeat  = 0                     // clear noBeat timer
            buttonDelay = buttonDebounce    // need to debounce button
            LCD.Cls                         // clears LCD display
End Sub 
   

// Delay for LCD  ==================================
DelayMS(200)                  // Allow LCD to warm up             
LCD.Cls                       // clear LCD Display 

// Initialize Variables  ==================================
colourChanger = 0
beatCounter = 0
beatDelay = 0
fakeBeat = 1257  '10 sec delay default
noBeat = fakeBeat
BPM_Interval = 0
BPM_approx = 0
trueBeat_Flag = 0 
j = 0
secondBeat = false

// Set Colour Values
colour = 0
white = 0                                                          
red = 18                                                            
multi = 26                                                          
magenta = 34                                                        
green = 67                                                          
yellow = 83                                                         
blue = 99                                                           
pink = 115                                                          
cyan = 124 
resetValue = 0

// DMX array setup
DMX_TX.DMX_Channel(3) = 16  // shutter = Open (ACME Light)

// Random Gen 
range = 40
RandGen2.Initialize(2)        // Initialize the Random Number generator.
RandGen2.SetRndMax(range)     // Set random MAX number 

button_1 = false    // BlackOut Off
button_2 = false    // Strobe off
button_3 = true     // set fast mode

buttonDelay = 0      // button debounce
buttonDebounce = 80  // button debounce 

menu_cycle = 0       // LCD menus
CHfunction = 0       // 

// Main Program ==================================
While true

        checkButtons     // check buttons Or Debounce buttons
        
        function_value = Get_ADC_Value  // get our ADC value from channel 1
      
        lcd_Update      // update LCD Display

        checkColourButton    // check colour button to change colour (user input)

    // button6 is set then use the Pot to operate CH function value
    If button6 = 0 And buttonDelay = 0 Then
        CHfunctionTest
    EndIf
    
    If button7 = 0 And buttonDelay = 0 Then
        DelayMS(200)         // added button bounce
        nobeatTimer
    EndIf

            // Fast or Slow Function 
            If button_3 = true Then
                range = 180
            Else
                range = 80
            EndIf

        RandGen2.SetRndMax(range) // set MAX random gen value 
        
    If beatInput = 1 And beatDelay = 0 Or noBeat = 0 Then
    
        If noBeat = 0 Then         // test to see if no beat
           range = 60              // set range low (motors etc slow)
         RandGen2.SetRndMax(range) // set MAX random gen value
         colourChanger = 0         // change colour
            trueBeat_Flag = 0      // stop true beat counter
            BPM_Interval = 0       // reset true beat counter
            BPM_approx = 0         // reset BPM
            secondBeat = false
        Else
            trueBeat_Flag = 1           // if beat is a true beat (turn on beat counter)
        EndIf 
        
        // BPM counter (First beat bpm interval counter set, second beat set j = bpm interval
        // third beat bpm approx updated and then updated every beat after unless no beat then all reset)
        If secondBeat = true And j = 0 Then
             j = BPM_Interval                   // on second beat
        ElseIf secondBeat = true Then           // on third beat and then every beat after (unless no beat)
            j = ((j * 7) + BPM_Interval) / 8    // get average value based on 8 
            
            BPM_approx = ((60 * 103) / j)       // 
   
            BPM_Interval = 0                    // reset beat interval counter
        Else
            secondBeat = true                   // on first beat
        EndIf

        noBeat = fakeBeat     // reset our no beat value
              
        barrelPos = RandGen2.rand ()                        // Get a random number
        barrelPos = 128 + ((barrelPos) - (range / 2) )      // set barrel pos depending on our range
        DMX_TX.DMX_Channel(0) = barrelPos                   // set channel with value
        barrelSpeed = RandGen2.rand ()                      // Get a random number
        barrelSpeed = 128 + ((barrelSpeed) - (range / 2) )  // set barrel speed depending on our range
        DMX_TX.DMX_Channel(1) = barrelSpeed                 // set channel with value
        
        If colourChanger <= 0 Then
            RandGen2.SetRndMax(8)         // set MAX random gen value 
            colour = RandGen2.rand ()     // Get a random number
    
                Select colour
                    Case 0                            //
                        colourValue = white           //
                    Case 1                            //
                        colourValue = red             //
                    Case 2                            //
                        colourValue = multi           //
                    Case 3                            // 
                        colourValue = magenta         //
                    Case 4                            //  Select which colour to display 
                        colourValue = green           //
                    Case 5                            //
                        colourValue = yellow          //
                    Case 6                            //
                        colourValue = blue            //
                    Case 7                            //
                        colourValue = pink            //
                    Case 8                            //
                        colourValue = cyan
                End Select
                
                DMX_TX.DMX_Channel(2) = colourValue       // set dmx channel 3 to colour value
            
            colourChanger = 15    // reset our colour changer value   
        EndIf
            Dec(colourChanger)    // Decrease our colour changer value
            Inc(beatCounter)      // Increase our beat counter value
        
        If beatCounter >= 200 Then    // Reset out beat counter
            beatCounter = 0
        EndIf
        beatDelay = 40  // set our delay beat detector to help stop false beats  
    EndIf
    
        // true beat counter (counter starts after first beat)
        If trueBeat_Flag = 1 Then
           Inc(BPM_Interval)
            If BPM_Interval = 200 Then
                BPM_Interval = 0
            EndIf
        EndIf
    
        // Transmit BlackOut DMX Packet
        If button_1 = true Then 
            DelayMS(300)     // debounce our button
            LCD.Cls          // clear LCD Display 
            LCD.WriteAt(1,1,"BlackOut Active")       
             Repeat
                DMX_TX.DMX_BlackOut 
                    If button1 = 0 Then   // check our button
                        button_1 = false
                    EndIf
             Until button_1 = false
                 buttonDelay = buttonDebounce  // need to debounce button1
             // reset all DMX channels
             For i = 0 To Bound(DMX_TX.DMX_Channel) 
                DMX_TX.DMX_Channel(i) = 128
                    If i = 3 Then
                        DMX_TX.DMX_Channel(3) = 16
                    EndIf   
             Next
             LCD.Cls                       // clear LCD Display                             
        Else 
            // Transmit all DMX packets
            DMX_TX.DMX_Packets
        EndIf
        
            // Strobe Function Set (operational ONLY when button is pressed and held)
            If button2 = 0 Then
                LCD.Cls          // clear LCD Display 
                LCD.WriteAt(1,1,"Strobe")
                    resetValue = DMX_TX.DMX_Channel(2)     // store our dmx channel 3 data
                    RandGen2.SetRndMax(255)                // set MAX random gen value 
                    DMX_TX.DMX_Channel(2) = 255            // set our dmx channel 3 to strobe setting
                Repeat
                    DMX_TX.DMX_Channel(0) = RandGen2.rand ()   // Get a random number
                    DMX_TX.DMX_4Channel (DMX_Channel(0),DMX_Channel(1),DMX_Channel(2),255)  'DMX_4Channel
                Until button2 = 1
                    DMX_TX.DMX_Channel(2) = resetValue    // we need to reset our dmx channel back to the original data
             EndIf 
       
       beat_delay   // decrease beat delay (help stop false beats)        
Wend

User avatar
brad
Site Admin
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: DMX Controller

Post by brad » Sun Mar 20, 2011 6:27 am

Don't you love it when you have that much code and it actually works!

User avatar
bitfogav
Moderator
Moderator
Posts: 915
Joined: Sun Mar 28, 2010 9:03 pm
Location: United Kingdom
Contact:

Re: DMX Controller

Post by bitfogav » Sun Mar 20, 2011 7:03 am

Your spot on there Brad!.. dont think ive used this many variables or program memory before!!.. :)
usedprog1.jpg
usedprog1.jpg (12.41 KiB) Viewed 19510 times

User avatar
odessa
I practically live here!
I practically live here!
Posts: 102
Joined: Thu Sep 09, 2010 6:06 am
Location: London
[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: DMX Controller

Post by odessa » Mon Mar 21, 2011 7:23 am

Ace project matey :D

Where do you get the connectors from that you use on your board Gav ?

The 2/4 way one that connect the pots etc to the PCB .. what are they called ?

Cheers

Jay
(\_/)
(='.')
(")-(")
This is a bunny, copy bunny into your signature to help him achieve world domination.

User avatar
bitfogav
Moderator
Moderator
Posts: 915
Joined: Sun Mar 28, 2010 9:03 pm
Location: United Kingdom
Contact:

Re: DMX Controller

Post by bitfogav » Mon Mar 21, 2011 7:35 am

Thank you Jay

I got them from ebay, from this seller :) They are called Header connectors.

not sure if hes got any 4 way headers on there at the moment?.

http://cgi.ebay.co.uk/5x-3-Way-Latching ... 1e61f6cb96
headersss.jpg
headersss.jpg (3.88 KiB) Viewed 19509 times

User avatar
brad
Site Admin
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: DMX Controller

Post by brad » Tue Mar 22, 2011 9:17 pm

I am looking to make some PCB's which will be for a large LED display. I want to be able to connect multiple boards together, so connectors like these might be the answer...

User avatar
odessa
I practically live here!
I practically live here!
Posts: 102
Joined: Thu Sep 09, 2010 6:06 am
Location: London
[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: DMX Controller

Post by odessa » Tue Mar 22, 2011 9:26 pm

Thanks Gav, bought a selection of them.

Much better than plain old headers !

Jay
(\_/)
(='.')
(")-(")
This is a bunny, copy bunny into your signature to help him achieve world domination.

User avatar
bitfogav
Moderator
Moderator
Posts: 915
Joined: Sun Mar 28, 2010 9:03 pm
Location: United Kingdom
Contact:

Re: DMX Controller

Post by bitfogav » Wed Mar 23, 2011 12:43 am

No Problems to you both :)

They are perfect headers with a plastic latch to keep the connector in place and with a good 0.1″ (2.54mm) pitch.

Post Reply
[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

Who is online

Users browsing this forum: No registered users and 5 guests