A local foundation has announced plans to donate automated external defibrillators — devices used to treat someone suffering sudden cardiac arrest — for use at all of the town’s school athletic fields and gymnasiums.

The Adam Greenlee Foundation, partnering with the Westport school district and Westport Police Athletic League on the project, also is raising money to buy portable AEDs for each school as an extra measure of protection for students on field trips or during athletic competitions at other schools. The device measures a heart’s rhythms and applies jolts of electricity to restore normal function.

The Greenlee Foundation is organizing the project in rcognition of the life-saving capabilities of defibrillators. In 2014, Adam Greenlee Jr., then a sixth-grader at Bedford Middle School, suffered a seizure and cardiac arrest, but was revived by staff who treated him with an AED and cardio-pulmonary resuscitation before he was taken to a hospital.

The fundraising goal is $50,000 by Nov. 15. In conjunction with the Sudden Cardiac Foundation, donations to the campaign are tax-deductible. The foundation says that 100 percent of the donations will be used to buy AEDs and to train school staff and coaches.

Within the last 20 months, according to the foundation, there have been two incidents when a Westport student suffered sudden cardiac arrest requiring life-saving measures, including use of an AED. In both cases, first-responder care and the use of the AED, in addition to CPR, saved both lives, according to the foundation.

To make an online donation, go to www.DreamOnAGF.org, click Make a Donation on the right side of the page and follow the prompts.

To donate by mail, send checks payable to “The Sudden Cardiac Arrest Foundation” to: Adam Greenlee Foundation, 28 Maple Ave. North, Westport, CT 06880. (Note on the check’s memo line the donation is for the the Adam Greenlee Foundation.)

For questions, email renegrenlee@me.com or agreenlee@silgan.com.