fixed bug in pin_analog and digital. variables_global now working OK