Netduino home hardware projects downloads community

Jump to content


Photo

Swing shifting in VB

VB shifting did blink

  • Please log in to reply
5 replies to this topic

#1 Dr Who

Dr Who

    Advanced Member

  • Members
  • PipPipPip
  • 261 posts
  • LocationNYC

Posted 08 July 2014 - 01:54 AM

Hello!

I've taken the original Blink in VB and translated it to the Mini. The VB code is basically the same idea as my others in C#, except that the LEDs shift across as opposed to the messy blinking in sequence that it ended up into afterwards.

Imports Microsoft.SPOT
Imports Microsoft.SPOT.Hardware
Imports SecretLabs.NETMF.Hardware
Imports SecretLabs.NETMF.Hardware.NetduinoMini

Module Module1

    Sub Main()
        ' write your code here
        '   Dim led As New OutputPort(Pins.GPIO_PIN_20, False)
        '   Dim led0 As New OutputPort(Pins.GPIO_PIN_19, False)
        '  Dim led1 As New OutputPort(Pins.GPIO_PIN_18, False)
        ' Dim led2 As New OutputPort(Pins.GPIO_PIN_17, False)
        Dim led3 As New OutputPort(Pins.GPIO_PIN_16, False)
        Dim led4 As New OutputPort(Pins.GPIO_PIN_15, False)
        Dim led5 As New OutputPort(Pins.GPIO_PIN_14, False)
        Dim led6 As New OutputPort(Pins.GPIO_PIN_13, False)
        Do
            led6.Write(False)
            led5.Write(False)
            led3.Write(False)
            led4.Write(False)
            '  led.Write(True)
            'Thread.Sleep(250)
            '  led.Write(False)
            'Thread.Sleep(250)
            '  led0.Write(True)
            'Thread.Sleep(250)
            '  led0.Write(False)
            '  led1.Write(True)
            'Thread.Sleep(250)
            '  led1.Write(False)
            '  led2.Write(True)
            Thread.Sleep(250)
            '  led2.Write(False)
            led3.Write(True)
            Thread.Sleep(250)
            led3.Write(False)
            led4.Write(True)
            Thread.Sleep(250)
            led4.Write(False)
            led5.Write(True)
            Thread.Sleep(250)
            led5.Write(False)
            led6.Write(True)
            Thread.Sleep(250)
            led6.Write(False)

        Loop

    End Sub

End Module

I also commented out the output designations that were originally assigned for a different function. I have the chosen four output lines connected to one of my programmed PAL chips and seeing a response there.

 

One of the big problems of using any of the Netduino devices is in displaying an event. Seeing a blink in LEDs is one thing, but it needs to be properly displayed. And from there the data is being sent to something else for further processing. 

 

And that "something else" is a BASIC Stamp 2 running, what else? Their BASIC dialect minding another programmed PAL chip who is receiving information, and then displaying it on a video screen using a rig called a Prop Backpack. That is one of their Prop chips preprogrammed and and wired to be able to display video on a standard screen. 



Doctor Who
"This signature does not exist!"

#2 Dr Who

Dr Who

    Advanced Member

  • Members
  • PipPipPip
  • 261 posts
  • LocationNYC

Posted 08 July 2014 - 11:30 PM

And sadly it didn't work out.



Doctor Who
"This signature does not exist!"

#3 JoopC

JoopC

    Advanced Member

  • Members
  • PipPipPip
  • 148 posts

Posted 15 July 2014 - 07:30 AM

Your syntax is not correct.

 

dim x as outputport

 

x = new outputport(pins.ONBOARD_LED, false)

x.write(true)

OR:

 

dim x as outputport = new outputport( netduino pin, false)

 

Did you use Debug.Print( ....  ) for debugging your code to Visual Studio?



#4 Dr Who

Dr Who

    Advanced Member

  • Members
  • PipPipPip
  • 261 posts
  • LocationNYC

Posted 20 July 2014 - 05:04 AM

Your syntax is not correct.

 

dim x as outputport

 

x = new outputport(pins.ONBOARD_LED, false)

x.write(true)

OR:

 

dim x as outputport = new outputport( netduino pin, false)

 

Did you use Debug.Print( ....  ) for debugging your code to Visual Studio?

 

I did not. I might also mention that the syntax is indeed correct as VS2010 did not flag the chosen methods as any form of an error. Have you examined the original Blink VB code? And even tried out my code on a Mini? Even the original code on a Mini?



Doctor Who
"This signature does not exist!"

#5 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 20 July 2014 - 01:30 PM

Hi Dr. Who,

It sounds like you have a few microcontrollers there, making up a bit of an orchestra. What fancy thing are you building? :)

Chris

#6 Dr Who

Dr Who

    Advanced Member

  • Members
  • PipPipPip
  • 261 posts
  • LocationNYC

Posted 20 July 2014 - 08:33 PM

Hi Dr. Who,

It sounds like you have a few microcontrollers there, making up a bit of an orchestra. What fancy thing are you building? :)

Chris

 

Hello!

Just trying to solve a few outstanding problems. Meanwhile nothing else going on here.



Doctor Who
"This signature does not exist!"




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.