It shall be unlawful for any pedestrian to fail to obey any sign or signal erected or maintained to indicate or carry out the provisions of this code or any local traffic ordinance or resolution adopted pursuant to a local traffic ordinance, or to fail to obey any device erected or maintained pursuant to Section 21352.