WALNUT CREEK — Drivers on the city’s crowded commute routes can join in the race to the digital future with a new app that will link their smartphones to traffic lights, giving them an alert when the green light is about to shine.

The free app announced Thursday morning will work with all 100 of the city’s traffic lights, which are linked to a city traffic control center.

“It is a great first step in opening our roadways to technology that will make our streets safer in the future,” said Mayor Bob Simmons.

A few seconds before a red traffic light changes, EnLighten will chime to refocus drivers on driving, perhaps drawing them back from sipping coffee, doing their makeup or surreptitiously checking their cell phones. The EnLighten app is available for Android and iPhone users.

The automatic alert conforms to laws against using a cell phone while driving. City leaders say they hope the technology will help smooth traffic and encourage drivers to pay more attention at busy intersections.

Bringing EnLighten to Walnut Creek involved the cooperation of its developer, Connected Signals, a high-tech startup; the Contra Costa Transportation Authority; Walnut Creek; and the Metropolitan Transportation Commission, which granted money for the project.

The Authority recently partnered with Honda to test autonomous vehicles at the newly established GoMentum Station test site in Concord.

The EnLighten launch marks the first time the public can use one of the new technologies being tested in the county, according to a city news release. Walnut Creek is only the second city in California — and the only one in Northern California — to make this technology available to motorists.

Contact Andrew McGall at amcgall@bayareanewsgroup.com, follow him at twitter.com/AndrewMcGall.