Matters that Break the Fast
Question

What about one who is grinding grain and something flies into his mouth as a result of that whilst he is fasting?
Praise be to Allah.Inhaling flour While fasting
Inhaling flour by one who is grinding grain does not spoil his fast, and his fast is valid, because when this happens it is not by their choice, and they did not mean for it to reach their stomachs.
Guidelines concerning matters that break the fast
I would like to take this opportunity to explain that matters which break a person’s fast – namely intercourse, eating, drinking, etc. only do so if you know (the ruling). However, if you do not know the ruling then they do not break your fast, because Allah says (interpretation of the meanings): 
“And there is no sin on you concerning that in which you made a mistake, except in regard to what your hearts deliberately intend.” [Al-Ahzab 33:5] 
“Our Lord! Punish us not if we forget or fall into error.” [Al-Baqarah 2:286]
The Prophet (peace and blessings of Allah be upon him) said: “My ummah is forgiven for their mistakes, forgetfulness, and what they are forced to do against their will.” The one who is ignorant is making a mistake, and if he knew he would not have done that, so if he does something that breaks the fast out of ignorance, then he is not to blame and his fast is complete and is valid, whether he was ignorant concerning the ruling or the time. 
A similar case is when a person does something that breaks the fast, thinking that it does not break the fast, such as one who has cupping done, thinking that cupping does not break the fast. We would say to him, your fast is valid and you do not have to do anything. And there are other things which happen to a person not by his choice; so there is no blame on him and that does not break his fast, for the reasons we have mentioned. 
In conclusion, matters that break the fast only break it when three conditions are met: 

Knowing the ruling
Not forgetting that he is fasting
Doing so by choice. 

And Allah knows best.