Re: Simple DC Motor code? Without motor shield?
Even if you don't use the motor shield itself, you can look at the circuit and the code for suggestions on what to do.
The simplest way to drive a DC motor is just to turn on the power. A half bridge controls power to the motor by creating low-resistance connections to the high or low voltage rails, depending on what you tell it to do.
To make a DC motor turn either direction, connect each wire to its own half bridge. Send half-bridge A HIGH and half-bridge B LOW to make the motor turn one direction, A LOW and B HIGH to make the motor turn the other direction.
To control the motor's speed, you turn the power on and off quickly, using a technique called "pulse-width modulation" or "PWM". Over the long term, a half-bridge that's HIGH 80% of the time and LOW the remaining 20% of the time gives the motor 80% as much power as one that's HIGH all the time.
The Motor Shield has all the hardware and software issues worked out, but like I said, even if you don't use the device itself, the circuit diagrams and the library code give you an example of stuff that's known to work.
When you void a product warranty, you give up your right to sue the manufacturer if something goes wrong and accept full responsibility for whatever happens next. And then you truly own the product.