Inside computer memory, create an XY grid which represents the room. Each square is 1 or 2 or 3 inches on a side. Start off with all squares marked blank. Whenever the bot detects an obstacle, mark that square 'off limits' on the grid.
Your rotating sensor is at the center of a sweep. It has polar coordinates, rather than XY coordinates. You need to convert from one coordinate system to the other. The formulae use sines and cosines.
Your sensor scheme needs to imitate a bat's acoustic sonar. Have you ever heard of anyone doing this? It will be a big accomplishment simply to detect an obstacle a few inches in front of the bot.