Yet another alternative: pics. And store the variables in pgf keys. Like Joule V's nice solution, this grid can be transformed (e.g. rotated) without resorting to transform canvas, which tends to mess up things.
\documentclass[tikz,border=3.14mm]{standalone}
\begin{document}
\begin{tikzpicture}[pics/cell/.style={code={\draw (-#1,-#1) rectangle (#1,#1)
(-#1,-#1) -- (#1,#1);
\fill[\pgfkeysvalueof{/tikz/cell/color}]
(135:{#1*\pgfkeysvalueof{/tikz/cell/circle pos}})
circle[radius=#1*\pgfkeysvalueof{/tikz/cell/radius}]
(-45:{#1*\pgfkeysvalueof{/tikz/cell/circle pos}})
circle[radius=#1*\pgfkeysvalueof{/tikz/cell/radius}];}},
cell/.cd,color/.initial=blue,radius/.initial=1/6,circle pos/.initial={sqrt(0.5)}]
\path foreach \X in {1,...,20}
{foreach \Y in {1,...,10} {(\X,\Y) pic[cell/radius=1/5,cell/circle pos=1/2]{cell=0.5}}};
\end{tikzpicture}
\end{document}
