Navigation from one screen to another screen in android HelloWorld by Manasi Dharne - March 27, 2019April 11, 20190 Functionality: How to interact with activity,when a button is clicked,navigate from current screen(current activity) to another screen(another activity). Activity: In android,an activity is representing a single screen.Most applications have multiple activities to represent different screens.for example,one activity to display a list of the application settings,another to display application status. To Create any application in android we have to deal with three files: AndroidManifest.xmlactivity_main.xmlMainActivity.java AndroidManifest.xml <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.nav.navigation" > <application android:label="@string/app_name" android:theme="@style/AppTheme" > <activity android:name=".MainActivity" android:label="@string/title_activity_main" > <intent-filter> <action android:name="android.intent.action.MAIN" /> <category
Calculator App in Android HelloWorld by Manasi Dharne - March 27, 2019March 28, 20190 Here ,we are creating simple and basic functions calculator App. This app can help you to understand the layouts, buttons and action handling. To create this app we need to use different widgets such as TextView, button, EditText etc.This app is able to perform following basic four mathematical functions : AdditionSubtractionMultiplicationDivision To Create any application in android we have to deal with three files: AndroidManifest.xmlactivity_main.xmlMainActivity.java AndroidManifest.xml The AndroidManifest.xml contains information of your package, including components of the application such as activities, services, broadcast receivers, content providers etc. <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.calculator.calculator2"> <application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name"
USB Communication HelloWorld by Manasi Dharne - March 26, 2019March 26, 20190 About Android USB Android supports USB devices through two modes: Android Accessory: In this mode external USB device acts as host.Android Host: In this mode Android Device acts as host and powers the external device. Manifest File for USB connection We want to be notified when an external USB device is attached to the Android device.This can be done adding a new intent filter entry to the Activity that should be started by the system when a USB device is plugged in. <activity ....... <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> <intent-filter> <action android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED"
ATSAME54 Config File Using Openocd embedded by blog_1buq8n - March 18, 2019April 11, 20190 Sometimes solutions are very simple. Openocd (Open On-Chip Debugger) is used on ubuntu for debugging and flashing programs to your target board. We are using SAM E54 Xplained Pro board. The problem started when we could not locate openocd config file for ATSAME54. After searching on google for a while we came to know that atsame5x.cfg we have to apply patch from openocd to get this working. As per openocd site they mentioned that support for ARM M4 series is added for microchip SAM D/E series controllers. We have downloaded patch updated openocd and after running it using following command, could not connect to board and got same error. $ openocd -f tcl/board/microchip_same54_xplained_pro.cfg Open On-Chip Debugger 0.10.0+dev-00409-g1ae106de (2019-03-18-12:24) Licensed under GNU
Software Unit Testing With Ceedling Testing by neudeep - March 12, 2019August 29, 20210 Ceedling is one of the best test automation framework for doing unit testing of your embedded C software system code. Unit testing is code that calls some other code to check if it performing as expected. Ceedling is specifically designed for running unit tests for C language code. Ceedling has feature of automatic generation of mock. Unity is a unit test framework.CMock creates the fake versions of other modules. Using these fake versions we can verify whether our module is working correctly or not.Ceedling include unit test framework(Unity) and Mocking framework(CMock).It requires Ruby to run as Ceedling build system uses rake files. Ceedling comes with a command line tool that can be used to generate the project. Check out details on how
Display selected item of ListView using toast in android HelloWorld by Manasi Dharne - March 11, 2019November 20, 20192 ListView In Android, List of scroll-able items can be displayed using ListView. Users can select any list item by clicking on it. Problem Statement: Develop an application to create list of fruits using ListView and display selected fruit of ListView using toast. How to get the selected item from ListView? Several Ways to create ListView: There 2 ways to create ListView: we can assign ListView by giving values in main.xml.we can assign values in string.xml. Sample Code: Here is sample code for ListView using toast in android, Created two files to develop an application. Layout file(activity_main.xml):This file contains code to design an GUI of an application. In this we have used widget ListView to display list and TextView to display text on lists.Activity file(MainActivity.java): This file contains
Hello World in android studio using activity,service & broadcastReceiver HelloWorld by Manasi Dharne - March 6, 2019April 11, 20190 Problem Statement: Printing Hello World text using activity,service and broadcast receiver. This program demonstrates how to call any activity from service and service from broadcast receiver. The application starts from broadcast receiver then control goes to service and service call activity to print "Hello World". Several ways To create an application: LocalBroadcastManager:This can be used ,If you want to send broadcasts to your application.BroadcastReceiver:This can be used,If you want to send broadcasts across applications. About Code: I have created 3 java classes namely broadcast,MyService,MyActivity. broadcast.java :This class inherits BroadcastReceiver class and contains method onReceive(Context context, Intent intent) to create an intent and to call startService() method.MyService.java:This class inherits Service class and contains method onBind(Intent intent) to create intent and to call startActivity().MainActivity.java:This class inherits Activity
Advantages and Disadvantages of Tkinter and wxPython HelloWorld by mayuri takle - March 4, 2019March 26, 20250 Python provides lot of GUI(graphical user interface) frameworks/toolkits. Most of the GUI toolkit are wrapper to the existing GUI components provided by native framework or OS (operating system). Few such widely GUI frameworks are Tkinter, wxPython, PyQt, and PyGame. Here will wrap up advantages and disadvantages of Tkinter and wxPython. #Tkinter: From portability point of view Tkinter is winner compared to wxPython. Pros: Part of python, nothing extra to download. Very simple syntax. The text widget is remarkably powerful and very easy to work with. The canvas widget is also very easy and powerful. No other toolkit provides the same mix of ease and power than those two widgets in my experience. Uses native widgets on the mac and windows. Tcl/Tk (Tool
Python’s role in developing real time embedded systems HelloWorld by mayuri takle - February 27, 2019February 27, 20190 Python isn't only the most-popular language for introductory CS programs, it's also the fastest-growing language for embedded computing. Maybe that sounds silly when you scan the numbers again and realize it's the fastest-growing language of the remaining 5% of embedded systems code that aren't C/C+ +, but Python will start eating into C/C++'s monopoly even more over the next few years. Python might be at its strongest when used as a communication middleman between the user and the embedded system they're working with. Sending messages through Python to or from an embedded system allows the user to automate testing. Python scripts can put the system into different states, set configurations, and test all sorts of real-world use cases.
Socket programming in Python HelloWorld by nikita - February 26, 2019February 26, 20190 Socket programming is a way of connecting two nodes on a network to communicate with each other. One socket(node) listens on a particular port at an IP, while other socket reaches out to the other to form a connection. Server forms the listener socket while client reaches out to the server. Server Socket Methods 1 s.bind() This method binds address (host name, port number pair) to socket. 2 s.listen() This method sets up and start TCP listener. 3 s.accept() This passively accept TCP client connection, waiting until connection arrives . Client Socket Methods s.connect() This method actively initiates TCP server connection. General Socket Methods 1 s.recv() This method receives TCP message 2 s.send() This method transmits TCP message 3 s.recvfrom() This method receives UDP message 4 s.sendto() This