Programmatically add fields to content type
The second piece of code creates a field in the Form API. This means that you do that when you create a custom form with several fields in it and then you have to handle its submission in your custom way. If this is what you want to do, fine. In this case you would need to add your custom form in your hook_menu().

Instead, from what I can understand with your question, you would like to add a field of the Field API to tour custom node type. For this matter you would need to use the field_create_field() and field_create_instance() functions. The excellent examples module provides very neat examples of how to accomplish that.