This document provides a comprehensive survey of applications of blockchains in the Internet of Things (IoT). It begins with an overview of blockchain technology and how it can help address challenges with centralized IoT models, such as single points of failure, lack of user control over data, and limited scalability. The document then surveys recent advances by industry and research to leverage blockchains to provide a decentralized, secure, and tamper-proof system for IoT data and communications. It discusses how blockchains can enhance fault tolerance, device autonomy, accountability, and enable features like smart contracts and programmable logic for IoT applications and interactions.