Spotify info over USB, VB help?
Posted: Fri Feb 01, 2013 8:00 pm
Ok, so I am working on many small parts of a bigger project.
I got a PIC18F4550 working with the USB Slave example "No Service Slave" and the ECIO_Interface_Example.vbproj
I can send bytes and get a reply
But, I do not understad VB.net
Here is what I want to accomplish:
I have a VB "class" that is a Spotify API.
This is what that looks like:
Dim Spotify As New Spotify()
Spotify.PlayPause()
Spotify.PlayPrev()
Spotify.PlayNext()
Spotify.Mute()
Spotify.VolumeUp()
Spotify.VolumeDown()
Spotify.Nowplaying() (Gets the name of the current playing track)
Spotify.Search("Artist",False) (Searches for "Artist")
Spotify.Search("Artist",True) (Searches for "Artist" and starts playing the results)
Now, I want to run a small program, written in VB, on my computer, that sends Spotify.Nowplaying() to my PIC over USB as a string that can be displayed on my LCD.
This should happen as soon as there is a change in Spotify.Nowplaying() so as soon as the track is changed in Spotify.
Also I want the VB program to scan for changes on three variables on the PIC so that if I push a switch connected to the PIC, that alters variable_1 that toggles the Spotify.PlayPause()
and variable_2 is Spotify.PlayPrev()
and variable_3 is Spotify.PlayNext()
I have managed to get this example running:
Public Class Form1
Dim spotify As New spotify
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Label1.Text = spotify.Nowplaying
End Sub
End Class
but that is just a local application with a button that when clicked prints Spotify.Nowplaying() as text in the program window.
How to combine this I have no idea, but maybe someone here does?
Here is the link to Spotify.vb http://spotifyomatic.codeplex.com/
I got a PIC18F4550 working with the USB Slave example "No Service Slave" and the ECIO_Interface_Example.vbproj
I can send bytes and get a reply
But, I do not understad VB.net
Here is what I want to accomplish:
I have a VB "class" that is a Spotify API.
This is what that looks like:
Dim Spotify As New Spotify()
Spotify.PlayPause()
Spotify.PlayPrev()
Spotify.PlayNext()
Spotify.Mute()
Spotify.VolumeUp()
Spotify.VolumeDown()
Spotify.Nowplaying() (Gets the name of the current playing track)
Spotify.Search("Artist",False) (Searches for "Artist")
Spotify.Search("Artist",True) (Searches for "Artist" and starts playing the results)
Now, I want to run a small program, written in VB, on my computer, that sends Spotify.Nowplaying() to my PIC over USB as a string that can be displayed on my LCD.
This should happen as soon as there is a change in Spotify.Nowplaying() so as soon as the track is changed in Spotify.
Also I want the VB program to scan for changes on three variables on the PIC so that if I push a switch connected to the PIC, that alters variable_1 that toggles the Spotify.PlayPause()
and variable_2 is Spotify.PlayPrev()
and variable_3 is Spotify.PlayNext()
I have managed to get this example running:
Public Class Form1
Dim spotify As New spotify
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Label1.Text = spotify.Nowplaying
End Sub
End Class
but that is just a local application with a button that when clicked prints Spotify.Nowplaying() as text in the program window.
How to combine this I have no idea, but maybe someone here does?
Here is the link to Spotify.vb http://spotifyomatic.codeplex.com/