Can I write a check to myself and cash it in an atm?

I have a M&T savings acct that I've only kept open to cash checks in town. I have a checking acct that I can write checks with. The atm has a check cashing feature that instantly reads the check and dishes out the dough. Can I write a check to myself or cash and not get in trouble?
...............................................................................
Well, you can do that when you go inside a bank, so probably it's okay at the atm too.
...............................................................................
That is an interesting concept, but just a thought, if you can access the check cashing feature, I would assume you first need your ATM card, and if you have that, why not just take out money using the Withdraw feature?
...............................................................................
Usually personal checks take 1 business day to clear so you may not be able to take monies out right away.
...............................................................................
No. You can only make an ATM withdrawal if your existing balance allows.