Typical Internet of Things (IoT) applications involve collecting information automatically from diverse geographically-distributed smart sensors and concentrating the information into more powerful computers. The Raspberry Pi platform has become a very interesting choice for IoT applications for several reasons: (1) good computing power/cost ratio; (2) high availability; it has become a de facto hardware standard; and (3) ease of use; it is based on operating systems with a big community of users. In IoT applications, data are frequently carried by means of wireless sensor networks in which energy consumption is a key issue. Energy consumption is especially relevant for smart sensors that are scattered over wide geographical areas and may need to work unattended on batteries for long intervals of time. In this scenario, it is convenient to ease the construction of IoT applications while keeping energy consumption to a minimum at the sensors. This work proposes a possible gateway implementation with specific technologies. It solves the following research question: how to build gateways for IoT applications with Raspberry Pi and low power IQRF communication modules. The following contributions are presented: (1) one architecture for IoT gateways that integrates data from sensor nodes into a higher level application based on low-cost/low-energy technologies; (2) bindings in Java and C that ease the construction of IoT applications; (3) an empirical model that describes the consumption of the communications at the nodes (smart sensors) and allows scaling their batteries; and (4) validation of the proposed energy model at the battery-operated nodes.