If you really want to use for you can. Since a few versions back it also supports reductions.
use Bitwise
sensor_data = %{sensor1: 0}
new_sensor_data =
for n <- 0..9, reduce: sensor_data do
acc -> Map.update!(acc, :sensor1, &(&1 ||| (1 <<< n)))
end


















