We focus on the problem of designing a TDMA service for a grid-based sensor network. Such networks are readily found in many applications in the area of monitoring, hazard detection, and so on. We consider three communication patterns, broadcast, convergecast and local gossip, that occur frequently in these systems. We develop TDMA service that can be customized based on the application requirements and also provide guidance about using this service when the communication pattern is unknown or varies with time. With these customizations, whenever a sensor receives a message, it can forward it to its successors with a small delay. We show that this TDMA service is collision free whereas existing CSMA based approaches suffer significant collisions. We also show how this service can be extended to deal with other deployments in a 2-D field, failure of sensors, and sensors that are sleeping as part of a power management scheme. Further, we show that this service can be used in a mobile sensor network that provides localization service.