Changed Chris' code to make proper serial trigger.