The diagram to use is really simple.
A USB mini B port is needed to connect it to the camera, while the other side can be connected to a female port connected to the microcontroller or we can cut directly the cable and apply the voltage difference right there.
The program we used to detect the usb port is really simple
@title Remote button
while 1
wait_click 1
if is_key "remote" then shoot
wend
end
It is an infinite cycle (while 1) that waits for some button to be pushed (wait_click 1). If the "button" is in reality the voltage difference in the usb (remote) then it triggers itself and repeats the cycle, if it is any other button then it repeats the cycle without triggering.
The voltage applied to the camera depends on the model. In our case it is enough with 3.75V, however other models require more voltage while others require less.
The CHDK notices the USB port as another button, which means that you can use it to modify the behavior of the program and not just to trigger the camera., today in class we will try to make the camera take pictures in certain time intervals, and when it gets a signal from the microcontroller it will take pictures when it senses movement.