What if you have an idea that uses existing technology, but in a new way, can you get a patent?

basically, can you still get some type of protection even if the technology has been around for a long time but is being used in a different way. Also, the technology has no patent on it as it has been around for a long time.