How do you pull a pin to "high"?

10 Jan 2015

I'm very very new to mbed and so I have a fairly newbie question. Also, I asked a question earlier, but don't know what the difference is between a question and a discussion.

So /media/uploads/mentality2/main.cpp is my code. It's modified from the original template as I couldn't get that working.

My LED is blinking as it should be when the pin is low (using USB) and it's measured to be around 0V. I use a resistor and connect it to the VIN pin and it's reading 4.9V, but it's still blinking. So either something's wrong with my code, or I'm doing something wrong?

Is there a specific circuit or resistor I'm supposed to use? Is the voltage not high enough? Is there not enough current? Or am I totally off track?

My "push user button and make LED blink" program works fine.

Thank you

18 Jan 2015

Hello Denise ! What do you mean with this: < if (PC_15 == 1) { myled = 1;

? What's on PC_15 ?If you do analog input, you should declare it first.