mbed as a USB device

Has anyone managed to get an mbed to behave as a USB device? I have
connected the mbed up as shown:

[image: Inline images 1]

Here is the schematic for the purists!

[image: Inline images 2]

The circuit wiring and information was taken from the USBDevice tutorials
from the mbed handbook:

http://mbed.org/handbook/USBDevice

Here is the code for the main.cpp that I have uploaded to the online
compiler:

#include “mbed.h”
#include “USBMouse.h”

DigitalOut led(LED1);
USBMouse mouse;

int main() {
while(1) {
mouse.move(10, 5);
led = !led;
wait(4);
}
}

The program has the mbed.h and USBMouse.h and USBMouse.cpp included. I am
always presented with the following when I connect up to any PC. I have
tried three different computers with different operating systems just to be
sure:

Here is what always happens:

[image: Inline images 3]

Anyone got any ideas…I’m kind of getting frustrated! I think I’m doing
something daft - I am not the best C++ coder in the world, in any language
for that matter :wink:

Hope someone can help,

Cheers

Alex

sorry, schematics are unreadable.
do you get any kind of detection message if you plug it into a pc?On 12 January 2014 21:57, Alexander Lang alexanderlang1980@gmail.comwrote:

Has anyone managed to get an mbed to behave as a USB device? I have
connected the mbed up as shown:

[image: Inline images 1]

Here is the schematic for the purists!

[image: Inline images 2]

The circuit wiring and information was taken from the USBDevice tutorials
from the mbed handbook:

http://mbed.org/handbook/USBDevice

Here is the code for the main.cpp that I have uploaded to the online
compiler:

#include “mbed.h”
#include “USBMouse.h”

DigitalOut led(LED1);
USBMouse mouse;

int main() {
while(1) {
mouse.move(10, 5);
led = !led;
wait(4);
}
}

The program has the mbed.h and USBMouse.h and USBMouse.cpp included. I am
always presented with the following when I connect up to any PC. I have
tried three different computers with different operating systems just to be
sure:

Here is what always happens:

[image: Inline images 3]

Anyone got any ideas…I’m kind of getting frustrated! I think I’m doing
something daft - I am not the best C++ coder in the world, in any language
for that matter :wink:

Hope someone can help,

Cheers

Alex


You received this message because you are subscribed to the Google Groups
“Hackspace Manchester” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to hacman+unsubscribe@googlegroups.com.
To post to this group, send an email to hacman@googlegroups.com.
Visit this group at http://groups.google.com/group/hacman.
For more options, visit https://groups.google.com/groups/opt_out.

Ben Dooks, http://www.fluff.org/ben/ bjdooks@googlemail.com

I assume Ben you are being sarcastic about the schematic. The error
message obtained was attached also…

I think I need to write a driver for my new mbed device…The documentation
from the site doesn’t make this clear…I will investigate further

AlexOn 12 Jan 2014 22:24, “Ben Dooks” bjdooks@googlemail.com wrote:

sorry, schematics are unreadable.
do you get any kind of detection message if you plug it into a pc?

On 12 January 2014 21:57, Alexander Lang alexanderlang1980@gmail.comwrote:

Has anyone managed to get an mbed to behave as a USB device? I have
connected the mbed up as shown:

[image: Inline images 1]

Here is the schematic for the purists!

[image: Inline images 2]

The circuit wiring and information was taken from the USBDevice tutorials
from the mbed handbook:

http://mbed.org/handbook/USBDevice

Here is the code for the main.cpp that I have uploaded to the online
compiler:

#include “mbed.h”
#include “USBMouse.h”

DigitalOut led(LED1);
USBMouse mouse;

int main() {
while(1) {
mouse.move(10, 5);
led = !led;
wait(4);
}
}

The program has the mbed.h and USBMouse.h and USBMouse.cpp included. I
am always presented with the following when I connect up to any PC. I have
tried three different computers with different operating systems just to be
sure:

Here is what always happens:

[image: Inline images 3]

Anyone got any ideas…I’m kind of getting frustrated! I think I’m
doing something daft - I am not the best C++ coder in the world, in any
language for that matter :wink:

Hope someone can help,

Cheers

Alex


You received this message because you are subscribed to the Google Groups
“Hackspace Manchester” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to hacman+unsubscribe@googlegroups.com.
To post to this group, send an email to hacman@googlegroups.com.
Visit this group at http://groups.google.com/group/hacman.
For more options, visit https://groups.google.com/groups/opt_out.


Ben Dooks, http://www.fluff.org/ben/ bjdooks@googlemail.com


You received this message because you are subscribed to the Google Groups
“Hackspace Manchester” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to hacman+unsubscribe@googlegroups.com.
To post to this group, send an email to hacman@googlegroups.com.
Visit this group at http://groups.google.com/group/hacman.
For more options, visit https://groups.google.com/groups/opt_out.

they where unreadable.On 12 January 2014 22:52, Alexander Lang alexanderlang1980@gmail.comwrote:

I assume Ben you are being sarcastic about the schematic. The error
message obtained was attached also…

I think I need to write a driver for my new mbed device…The
documentation from the site doesn’t make this clear…I will investigate
further

Alex
On 12 Jan 2014 22:24, “Ben Dooks” bjdooks@googlemail.com wrote:

sorry, schematics are unreadable.
do you get any kind of detection message if you plug it into a pc?

On 12 January 2014 21:57, Alexander Lang alexanderlang1980@gmail.comwrote:

Has anyone managed to get an mbed to behave as a USB device? I have
connected the mbed up as shown:

[image: Inline images 1]

Here is the schematic for the purists!

[image: Inline images 2]

The circuit wiring and information was taken from the USBDevice
tutorials from the mbed handbook:

http://mbed.org/handbook/USBDevice

Here is the code for the main.cpp that I have uploaded to the online
compiler:

#include “mbed.h”
#include “USBMouse.h”

DigitalOut led(LED1);
USBMouse mouse;

int main() {
while(1) {
mouse.move(10, 5);
led = !led;
wait(4);
}
}

The program has the mbed.h and USBMouse.h and USBMouse.cpp included. I
am always presented with the following when I connect up to any PC. I have
tried three different computers with different operating systems just to be
sure:

Here is what always happens:

[image: Inline images 3]

Anyone got any ideas…I’m kind of getting frustrated! I think I’m
doing something daft - I am not the best C++ coder in the world, in any
language for that matter :wink:

Hope someone can help,

Cheers

Alex


You received this message because you are subscribed to the Google
Groups “Hackspace Manchester” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to hacman+unsubscribe@googlegroups.com.
To post to this group, send an email to hacman@googlegroups.com.
Visit this group at http://groups.google.com/group/hacman.
For more options, visit https://groups.google.com/groups/opt_out.


Ben Dooks, http://www.fluff.org/ben/ bjdooks@googlemail.com


You received this message because you are subscribed to the Google Groups
“Hackspace Manchester” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to hacman+unsubscribe@googlegroups.com.
To post to this group, send an email to hacman@googlegroups.com.
Visit this group at http://groups.google.com/group/hacman.
For more options, visit https://groups.google.com/groups/opt_out.


You received this message because you are subscribed to the Google Groups
“Hackspace Manchester” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to hacman+unsubscribe@googlegroups.com.
To post to this group, send an email to hacman@googlegroups.com.
Visit this group at http://groups.google.com/group/hacman.
For more options, visit https://groups.google.com/groups/opt_out.

Ben Dooks, http://www.fluff.org/ben/ bjdooks@googlemail.com

So you can see the attached pictures now?

AlexOn 12 Jan 2014 22:52, “Ben Dooks” bjdooks@googlemail.com wrote:

they where unreadable.

On 12 January 2014 22:52, Alexander Lang alexanderlang1980@gmail.comwrote:

I assume Ben you are being sarcastic about the schematic. The error
message obtained was attached also…

I think I need to write a driver for my new mbed device…The
documentation from the site doesn’t make this clear…I will investigate
further

Alex
On 12 Jan 2014 22:24, “Ben Dooks” bjdooks@googlemail.com wrote:

sorry, schematics are unreadable.
do you get any kind of detection message if you plug it into a pc?

On 12 January 2014 21:57, Alexander Lang alexanderlang1980@gmail.comwrote:

Has anyone managed to get an mbed to behave as a USB device? I have
connected the mbed up as shown:

[image: Inline images 1]

Here is the schematic for the purists!

[image: Inline images 2]

The circuit wiring and information was taken from the USBDevice
tutorials from the mbed handbook:

http://mbed.org/handbook/USBDevice

Here is the code for the main.cpp that I have uploaded to the online
compiler:

#include “mbed.h”
#include “USBMouse.h”

DigitalOut led(LED1);
USBMouse mouse;

int main() {
while(1) {
mouse.move(10, 5);
led = !led;
wait(4);
}
}

The program has the mbed.h and USBMouse.h and USBMouse.cpp included. I
am always presented with the following when I connect up to any PC. I have
tried three different computers with different operating systems just to be
sure:

Here is what always happens:

[image: Inline images 3]

Anyone got any ideas…I’m kind of getting frustrated! I think I’m
doing something daft - I am not the best C++ coder in the world, in any
language for that matter :wink:

Hope someone can help,

Cheers

Alex


You received this message because you are subscribed to the Google
Groups “Hackspace Manchester” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to hacman+unsubscribe@googlegroups.com.
To post to this group, send an email to hacman@googlegroups.com.
Visit this group at http://groups.google.com/group/hacman.
For more options, visit https://groups.google.com/groups/opt_out.


Ben Dooks, http://www.fluff.org/ben/ bjdooks@googlemail.com


You received this message because you are subscribed to the Google
Groups “Hackspace Manchester” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to hacman+unsubscribe@googlegroups.com.
To post to this group, send an email to hacman@googlegroups.com.
Visit this group at http://groups.google.com/group/hacman.
For more options, visit https://groups.google.com/groups/opt_out.


You received this message because you are subscribed to the Google Groups
“Hackspace Manchester” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to hacman+unsubscribe@googlegroups.com.
To post to this group, send an email to hacman@googlegroups.com.
Visit this group at http://groups.google.com/group/hacman.
For more options, visit https://groups.google.com/groups/opt_out.


Ben Dooks, http://www.fluff.org/ben/ bjdooks@googlemail.com


You received this message because you are subscribed to the Google Groups
“Hackspace Manchester” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to hacman+unsubscribe@googlegroups.com.
To post to this group, send an email to hacman@googlegroups.com.
Visit this group at http://groups.google.com/group/hacman.
For more options, visit https://groups.google.com/groups/opt_out.

sorry, what I meant is that they are too small to be readable…On 12 January 2014 22:55, Alexander Lang alexanderlang1980@gmail.comwrote:

So you can see the attached pictures now?

Alex
On 12 Jan 2014 22:52, “Ben Dooks” bjdooks@googlemail.com wrote:

they where unreadable.

On 12 January 2014 22:52, Alexander Lang alexanderlang1980@gmail.comwrote:

I assume Ben you are being sarcastic about the schematic. The error
message obtained was attached also…

I think I need to write a driver for my new mbed device…The
documentation from the site doesn’t make this clear…I will investigate
further

Alex
On 12 Jan 2014 22:24, “Ben Dooks” bjdooks@googlemail.com wrote:

sorry, schematics are unreadable.
do you get any kind of detection message if you plug it into a pc?

On 12 January 2014 21:57, Alexander Lang alexanderlang1980@gmail.comwrote:

Has anyone managed to get an mbed to behave as a USB device? I have
connected the mbed up as shown:

[image: Inline images 1]

Here is the schematic for the purists!

[image: Inline images 2]

The circuit wiring and information was taken from the USBDevice
tutorials from the mbed handbook:

http://mbed.org/handbook/USBDevice

Here is the code for the main.cpp that I have uploaded to the online
compiler:

#include “mbed.h”
#include “USBMouse.h”

DigitalOut led(LED1);
USBMouse mouse;

int main() {
while(1) {
mouse.move(10, 5);
led = !led;
wait(4);
}
}

The program has the mbed.h and USBMouse.h and USBMouse.cpp included.
I am always presented with the following when I connect up to any PC. I
have tried three different computers with different operating systems just
to be sure:

Here is what always happens:

[image: Inline images 3]

Anyone got any ideas…I’m kind of getting frustrated! I think I’m
doing something daft - I am not the best C++ coder in the world, in any
language for that matter :wink:

Hope someone can help,

Cheers

Alex


You received this message because you are subscribed to the Google
Groups “Hackspace Manchester” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to hacman+unsubscribe@googlegroups.com.
To post to this group, send an email to hacman@googlegroups.com.
Visit this group at http://groups.google.com/group/hacman.
For more options, visit https://groups.google.com/groups/opt_out.


Ben Dooks, http://www.fluff.org/ben/ bjdooks@googlemail.com


You received this message because you are subscribed to the Google
Groups “Hackspace Manchester” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to hacman+unsubscribe@googlegroups.com.
To post to this group, send an email to hacman@googlegroups.com.
Visit this group at http://groups.google.com/group/hacman.
For more options, visit https://groups.google.com/groups/opt_out.


You received this message because you are subscribed to the Google
Groups “Hackspace Manchester” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to hacman+unsubscribe@googlegroups.com.
To post to this group, send an email to hacman@googlegroups.com.
Visit this group at http://groups.google.com/group/hacman.
For more options, visit https://groups.google.com/groups/opt_out.


Ben Dooks, http://www.fluff.org/ben/ bjdooks@googlemail.com


You received this message because you are subscribed to the Google Groups
“Hackspace Manchester” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to hacman+unsubscribe@googlegroups.com.
To post to this group, send an email to hacman@googlegroups.com.
Visit this group at http://groups.google.com/group/hacman.
For more options, visit https://groups.google.com/groups/opt_out.


You received this message because you are subscribed to the Google Groups
“Hackspace Manchester” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to hacman+unsubscribe@googlegroups.com.
To post to this group, send an email to hacman@googlegroups.com.
Visit this group at http://groups.google.com/group/hacman.
For more options, visit https://groups.google.com/groups/opt_out.

Ben Dooks, http://www.fluff.org/ben/ bjdooks@googlemail.com

You can always click on them to look at the larger versions…They are
boiler plate usb connections…nowt special

AlexOn 12 Jan 2014 22:56, “Ben Dooks” bjdooks@googlemail.com wrote:

sorry, what I meant is that they are too small to be readable…

On 12 January 2014 22:55, Alexander Lang alexanderlang1980@gmail.comwrote:

So you can see the attached pictures now?

Alex
On 12 Jan 2014 22:52, “Ben Dooks” bjdooks@googlemail.com wrote:

they where unreadable.

On 12 January 2014 22:52, Alexander Lang alexanderlang1980@gmail.comwrote:

I assume Ben you are being sarcastic about the schematic. The error
message obtained was attached also…

I think I need to write a driver for my new mbed device…The
documentation from the site doesn’t make this clear…I will investigate
further

Alex
On 12 Jan 2014 22:24, “Ben Dooks” bjdooks@googlemail.com wrote:

sorry, schematics are unreadable.
do you get any kind of detection message if you plug it into a pc?

On 12 January 2014 21:57, Alexander Lang alexanderlang1980@gmail.comwrote:

Has anyone managed to get an mbed to behave as a USB device? I have
connected the mbed up as shown:

[image: Inline images 1]

Here is the schematic for the purists!

[image: Inline images 2]

The circuit wiring and information was taken from the USBDevice
tutorials from the mbed handbook:

http://mbed.org/handbook/USBDevice

Here is the code for the main.cpp that I have uploaded to the online
compiler:

#include “mbed.h”
#include “USBMouse.h”

DigitalOut led(LED1);
USBMouse mouse;

int main() {
while(1) {
mouse.move(10, 5);
led = !led;
wait(4);
}
}

The program has the mbed.h and USBMouse.h and USBMouse.cpp included.
I am always presented with the following when I connect up to any PC. I
have tried three different computers with different operating systems just
to be sure:

Here is what always happens:

[image: Inline images 3]

Anyone got any ideas…I’m kind of getting frustrated! I think I’m
doing something daft - I am not the best C++ coder in the world, in any
language for that matter :wink:

Hope someone can help,

Cheers

Alex


You received this message because you are subscribed to the Google
Groups “Hackspace Manchester” group.
To unsubscribe from this group and stop receiving emails from it,
send an email to hacman+unsubscribe@googlegroups.com.
To post to this group, send an email to hacman@googlegroups.com.
Visit this group at http://groups.google.com/group/hacman.
For more options, visit https://groups.google.com/groups/opt_out.


Ben Dooks, http://www.fluff.org/ben/ bjdooks@googlemail.com


You received this message because you are subscribed to the Google
Groups “Hackspace Manchester” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to hacman+unsubscribe@googlegroups.com.
To post to this group, send an email to hacman@googlegroups.com.
Visit this group at http://groups.google.com/group/hacman.
For more options, visit https://groups.google.com/groups/opt_out.


You received this message because you are subscribed to the Google
Groups “Hackspace Manchester” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to hacman+unsubscribe@googlegroups.com.
To post to this group, send an email to hacman@googlegroups.com.
Visit this group at http://groups.google.com/group/hacman.
For more options, visit https://groups.google.com/groups/opt_out.


Ben Dooks, http://www.fluff.org/ben/ bjdooks@googlemail.com


You received this message because you are subscribed to the Google
Groups “Hackspace Manchester” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to hacman+unsubscribe@googlegroups.com.
To post to this group, send an email to hacman@googlegroups.com.
Visit this group at http://groups.google.com/group/hacman.
For more options, visit https://groups.google.com/groups/opt_out.


You received this message because you are subscribed to the Google Groups
“Hackspace Manchester” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to hacman+unsubscribe@googlegroups.com.
To post to this group, send an email to hacman@googlegroups.com.
Visit this group at http://groups.google.com/group/hacman.
For more options, visit https://groups.google.com/groups/opt_out.


Ben Dooks, http://www.fluff.org/ben/ bjdooks@googlemail.com


You received this message because you are subscribed to the Google Groups
“Hackspace Manchester” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to hacman+unsubscribe@googlegroups.com.
To post to this group, send an email to hacman@googlegroups.com.
Visit this group at http://groups.google.com/group/hacman.
For more options, visit https://groups.google.com/groups/opt_out.

Annoyingly, neither gmail nor the Google Groups interface give you a link
to a larger version. The pictures can be viewed clearly if you right-click
and pick ‘Open Image in new tab’.

The diagrams and code look OK, but in your photo you’ve got wires connected
to VU and VOUT and nothing on VIN. I don’t think you want anything
connected to VU or VOUT.On 12 January 2014 21:57, Alexander Lang alexanderlang1980@gmail.comwrote:

Has anyone managed to get an mbed to behave as a USB device? I have
connected the mbed up as shown:

[image: Inline images 1]

Here is the schematic for the purists!

[image: Inline images 2]

The circuit wiring and information was taken from the USBDevice tutorials
from the mbed handbook:

http://mbed.org/handbook/USBDevice

Here is the code for the main.cpp that I have uploaded to the online
compiler:

#include “mbed.h”
#include “USBMouse.h”

DigitalOut led(LED1);
USBMouse mouse;

int main() {
while(1) {
mouse.move(10, 5);
led = !led;
wait(4);
}
}

The program has the mbed.h and USBMouse.h and USBMouse.cpp included. I am
always presented with the following when I connect up to any PC. I have
tried three different computers with different operating systems just to be
sure:

Here is what always happens:

[image: Inline images 3]

Anyone got any ideas…I’m kind of getting frustrated! I think I’m doing
something daft - I am not the best C++ coder in the world, in any language
for that matter :wink:

Hope someone can help,

Cheers

Alex


You received this message because you are subscribed to the Google Groups
“Hackspace Manchester” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to hacman+unsubscribe@googlegroups.com.
To post to this group, send an email to hacman@googlegroups.com.
Visit this group at http://groups.google.com/group/hacman.
For more options, visit https://groups.google.com/groups/opt_out.

I’m using the +5V pin on the right hand side to connect power to the mbed.
The other 3.3V pin is connected to the breadboard bus but not connected to
anything else.

The circuit was connected as described and depicted in the handbook
picture.

Doesn’t truly matter as it still doesn’t work.

http://mbed.org/handbook/USBDevice

It’s a driver issue…i reckon. The Os is not seeing the mbed as a generic
device.

Alex
Annoyingly, neither gmail nor the Google Groups interface give you a link
to a larger version. The pictures can be viewed clearly if you right-click
and pick ‘Open Image in new tab’.

The diagrams and code look OK, but in your photo you’ve got wires connected
to VU and VOUT and nothing on VIN. I don’t think you want anything
connected to VU or VOUT.On 12 January 2014 21:57, Alexander Lang alexanderlang1980@gmail.comwrote:

Has anyone managed to get an mbed to behave as a USB device? I have
connected the mbed up as shown:

[image: Inline images 1]

Here is the schematic for the purists!

[image: Inline images 2]

The circuit wiring and information was taken from the USBDevice tutorials
from the mbed handbook:

http://mbed.org/handbook/USBDevice

Here is the code for the main.cpp that I have uploaded to the online
compiler:

#include “mbed.h”
#include “USBMouse.h”

DigitalOut led(LED1);
USBMouse mouse;

int main() {
while(1) {
mouse.move(10, 5);
led = !led;
wait(4);
}
}

The program has the mbed.h and USBMouse.h and USBMouse.cpp included. I am
always presented with the following when I connect up to any PC. I have
tried three different computers with different operating systems just to be
sure:

Here is what always happens:

[image: Inline images 3]

Anyone got any ideas…I’m kind of getting frustrated! I think I’m doing
something daft - I am not the best C++ coder in the world, in any language
for that matter :wink:

Hope someone can help,

Cheers

Alex


You received this message because you are subscribed to the Google Groups
“Hackspace Manchester” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to hacman+unsubscribe@googlegroups.com.
To post to this group, send an email to hacman@googlegroups.com.
Visit this group at http://groups.google.com/group/hacman.
For more options, visit https://groups.google.com/groups/opt_out.

You received this message because you are subscribed to the Google Groups
“Hackspace Manchester” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to hacman+unsubscribe@googlegroups.com.
To post to this group, send an email to hacman@googlegroups.com.
Visit this group at http://groups.google.com/group/hacman.
For more options, visit https://groups.google.com/groups/opt_out.

I think you should try on one of the Linux boxes at the lab. AFAIK windows
requires a driver for every damn thing. If memory serves me correctly I had
problems with vusb. It worked fine in Linux without any drivers. The
example I used had a windows driver.On 13 Jan 2014 07:39, “Alexander Lang” alexanderlang1980@gmail.com wrote:

I’m using the +5V pin on the right hand side to connect power to the
mbed. The other 3.3V pin is connected to the breadboard bus but not
connected to anything else.

The circuit was connected as described and depicted in the handbook
picture.

Doesn’t truly matter as it still doesn’t work.

http://mbed.org/handbook/USBDevice

It’s a driver issue…i reckon. The Os is not seeing the mbed as a generic
device.

Alex
Annoyingly, neither gmail nor the Google Groups interface give you a
link to a larger version. The pictures can be viewed clearly if you
right-click and pick ‘Open Image in new tab’.

The diagrams and code look OK, but in your photo you’ve got wires
connected to VU and VOUT and nothing on VIN. I don’t think you want
anything connected to VU or VOUT.

On 12 January 2014 21:57, Alexander Lang alexanderlang1980@gmail.comwrote:

Has anyone managed to get an mbed to behave as a USB device? I have
connected the mbed up as shown:

[image: Inline images 1]

Here is the schematic for the purists!

[image: Inline images 2]

The circuit wiring and information was taken from the USBDevice tutorials
from the mbed handbook:

http://mbed.org/handbook/USBDevice

Here is the code for the main.cpp that I have uploaded to the online
compiler:

#include “mbed.h”
#include “USBMouse.h”

DigitalOut led(LED1);
USBMouse mouse;

int main() {
while(1) {
mouse.move(10, 5);
led = !led;
wait(4);
}
}

The program has the mbed.h and USBMouse.h and USBMouse.cpp included. I
am always presented with the following when I connect up to any PC. I have
tried three different computers with different operating systems just to be
sure:

Here is what always happens:

[image: Inline images 3]

Anyone got any ideas…I’m kind of getting frustrated! I think I’m
doing something daft - I am not the best C++ coder in the world, in any
language for that matter :wink:

Hope someone can help,

Cheers

Alex


You received this message because you are subscribed to the Google Groups
“Hackspace Manchester” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to hacman+unsubscribe@googlegroups.com.
To post to this group, send an email to hacman@googlegroups.com.
Visit this group at http://groups.google.com/group/hacman.
For more options, visit https://groups.google.com/groups/opt_out.


You received this message because you are subscribed to the Google Groups
“Hackspace Manchester” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to hacman+unsubscribe@googlegroups.com.
To post to this group, send an email to hacman@googlegroups.com.
Visit this group at http://groups.google.com/group/hacman.
For more options, visit https://groups.google.com/groups/opt_out.


You received this message because you are subscribed to the Google Groups
“Hackspace Manchester” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to hacman+unsubscribe@googlegroups.com.
To post to this group, send an email to hacman@googlegroups.com.
Visit this group at http://groups.google.com/group/hacman.
For more options, visit https://groups.google.com/groups/opt_out.

I’ve noticed that when my USB device is detected it’s VID and PID numbers
are 0000. This doesnt’ match anything else and isn’t correct which
suggests I have either poor code or fried my mbed in some way. Doesn’t
seem likely as it works for everything else. Does anyone have an mbed
motherboard I can test it in?

Cheers

AlexOn 13 January 2014 17:33, Steven Choi swchoi.choi@gmail.com wrote:

I think you should try on one of the Linux boxes at the lab. AFAIK
windows requires a driver for every damn thing. If memory serves me
correctly I had problems with vusb. It worked fine in Linux without any
drivers. The example I used had a windows driver.
On 13 Jan 2014 07:39, “Alexander Lang” alexanderlang1980@gmail.com wrote:

I’m using the +5V pin on the right hand side to connect power to the
mbed. The other 3.3V pin is connected to the breadboard bus but not
connected to anything else.

The circuit was connected as described and depicted in the handbook
picture.

Doesn’t truly matter as it still doesn’t work.

http://mbed.org/handbook/USBDevice

It’s a driver issue…i reckon. The Os is not seeing the mbed as a
generic device.

Alex
Annoyingly, neither gmail nor the Google Groups interface give you a
link to a larger version. The pictures can be viewed clearly if you
right-click and pick ‘Open Image in new tab’.

The diagrams and code look OK, but in your photo you’ve got wires
connected to VU and VOUT and nothing on VIN. I don’t think you want
anything connected to VU or VOUT.

On 12 January 2014 21:57, Alexander Lang alexanderlang1980@gmail.comwrote:

Has anyone managed to get an mbed to behave as a USB device? I have
connected the mbed up as shown:

[image: Inline images 1]

Here is the schematic for the purists!

[image: Inline images 2]

The circuit wiring and information was taken from the USBDevice
tutorials from the mbed handbook:

http://mbed.org/handbook/USBDevice

Here is the code for the main.cpp that I have uploaded to the online
compiler:

#include “mbed.h”
#include “USBMouse.h”

DigitalOut led(LED1);
USBMouse mouse;

int main() {
while(1) {
mouse.move(10, 5);
led = !led;
wait(4);
}
}

The program has the mbed.h and USBMouse.h and USBMouse.cpp included. I
am always presented with the following when I connect up to any PC. I have
tried three different computers with different operating systems just to be
sure:

Here is what always happens:

[image: Inline images 3]

Anyone got any ideas…I’m kind of getting frustrated! I think I’m
doing something daft - I am not the best C++ coder in the world, in any
language for that matter :wink:

Hope someone can help,

Cheers

Alex


You received this message because you are subscribed to the Google
Groups “Hackspace Manchester” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to hacman+unsubscribe@googlegroups.com.
To post to this group, send an email to hacman@googlegroups.com.
Visit this group at http://groups.google.com/group/hacman.
For more options, visit https://groups.google.com/groups/opt_out.


You received this message because you are subscribed to the Google Groups
“Hackspace Manchester” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to hacman+unsubscribe@googlegroups.com.
To post to this group, send an email to hacman@googlegroups.com.
Visit this group at http://groups.google.com/group/hacman.
For more options, visit https://groups.google.com/groups/opt_out.


You received this message because you are subscribed to the Google Groups
“Hackspace Manchester” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to hacman+unsubscribe@googlegroups.com.
To post to this group, send an email to hacman@googlegroups.com.
Visit this group at http://groups.google.com/group/hacman.
For more options, visit https://groups.google.com/groups/opt_out.


You received this message because you are subscribed to the Google Groups
“Hackspace Manchester” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to hacman+unsubscribe@googlegroups.com.
To post to this group, send an email to hacman@googlegroups.com.
Visit this group at http://groups.google.com/group/hacman.
For more options, visit https://groups.google.com/groups/opt_out.

I have fixed my issue…I found deep within the USB library contructor that
the VID and PID number were set to 0000. I found a generic USB driver file
and set them to the number referenced and it was detected and works as a
virtual serial port. Now to turn my mbed into a 32Gb USB stick using an SD
card!

Cheers for the replies help and support people!

AlexOn 13 January 2014 21:24, Alexander Lang alexanderlang1980@gmail.comwrote:

I’ve noticed that when my USB device is detected it’s VID and PID numbers
are 0000. This doesnt’ match anything else and isn’t correct which
suggests I have either poor code or fried my mbed in some way. Doesn’t
seem likely as it works for everything else. Does anyone have an mbed
motherboard I can test it in?

Cheers

Alex

On 13 January 2014 17:33, Steven Choi swchoi.choi@gmail.com wrote:

I think you should try on one of the Linux boxes at the lab. AFAIK
windows requires a driver for every damn thing. If memory serves me
correctly I had problems with vusb. It worked fine in Linux without any
drivers. The example I used had a windows driver.
On 13 Jan 2014 07:39, “Alexander Lang” alexanderlang1980@gmail.com wrote:

I’m using the +5V pin on the right hand side to connect power to the
mbed. The other 3.3V pin is connected to the breadboard bus but not
connected to anything else.

The circuit was connected as described and depicted in the handbook
picture.

Doesn’t truly matter as it still doesn’t work.

http://mbed.org/handbook/USBDevice

It’s a driver issue…i reckon. The Os is not seeing the mbed as a
generic device.

Alex
Annoyingly, neither gmail nor the Google Groups interface give you a
link to a larger version. The pictures can be viewed clearly if you
right-click and pick ‘Open Image in new tab’.

The diagrams and code look OK, but in your photo you’ve got wires
connected to VU and VOUT and nothing on VIN. I don’t think you want
anything connected to VU or VOUT.

On 12 January 2014 21:57, Alexander Lang alexanderlang1980@gmail.comwrote:

Has anyone managed to get an mbed to behave as a USB device? I have
connected the mbed up as shown:

[image: Inline images 1]

Here is the schematic for the purists!

[image: Inline images 2]

The circuit wiring and information was taken from the USBDevice
tutorials from the mbed handbook:

http://mbed.org/handbook/USBDevice

Here is the code for the main.cpp that I have uploaded to the online
compiler:

#include “mbed.h”
#include “USBMouse.h”

DigitalOut led(LED1);
USBMouse mouse;

int main() {
while(1) {
mouse.move(10, 5);
led = !led;
wait(4);
}
}

The program has the mbed.h and USBMouse.h and USBMouse.cpp included. I
am always presented with the following when I connect up to any PC. I have
tried three different computers with different operating systems just to be
sure:

Here is what always happens:

[image: Inline images 3]

Anyone got any ideas…I’m kind of getting frustrated! I think I’m
doing something daft - I am not the best C++ coder in the world, in any
language for that matter :wink:

Hope someone can help,

Cheers

Alex


You received this message because you are subscribed to the Google
Groups “Hackspace Manchester” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to hacman+unsubscribe@googlegroups.com.
To post to this group, send an email to hacman@googlegroups.com.
Visit this group at http://groups.google.com/group/hacman.
For more options, visit https://groups.google.com/groups/opt_out.


You received this message because you are subscribed to the Google
Groups “Hackspace Manchester” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to hacman+unsubscribe@googlegroups.com.
To post to this group, send an email to hacman@googlegroups.com.
Visit this group at http://groups.google.com/group/hacman.
For more options, visit https://groups.google.com/groups/opt_out.


You received this message because you are subscribed to the Google
Groups “Hackspace Manchester” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to hacman+unsubscribe@googlegroups.com.
To post to this group, send an email to hacman@googlegroups.com.
Visit this group at http://groups.google.com/group/hacman.
For more options, visit https://groups.google.com/groups/opt_out.


You received this message because you are subscribed to the Google Groups
“Hackspace Manchester” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to hacman+unsubscribe@googlegroups.com.
To post to this group, send an email to hacman@googlegroups.com.
Visit this group at http://groups.google.com/group/hacman.
For more options, visit https://groups.google.com/groups/opt_out.

It’s a driver issue…i reckon. The Os is not seeing the mbed as a generic
device.

http://linuxcommand.org/man_pages/lsusb8.html

Alan Burlison