The federal funding will go to buy new devices, improve public library infrastructure and offer digital literacy training.