Discussion: Run python file on the TM4c1294XL board
4 messages from 4 displayed.
//= Settings::TRACKING_CODE_B ?> //= Settings::TRACKING_CODE ?>
Hey
I can understand your concern. Python is an interpreted, object-oriented
programming language. Python is a high-level programming language. It is a
dynamically typed language. It’s high-level built-in data structures, combined
with dynamic typing and dynamic binding, make it very attractive and useful for
Rapid Application Development.It is very difficult to choose to go for which
course. After completing studies or while learning through the programming
language which course you should go for. There are different programming
languages to learn so there can be confusion, whether to go.
<a href='https://www.sevenmentor.com/python-course-in-kolhapur'>Python
classes in Kolhapur</a>
<a href='https://www.sevenmentor.com/python-course-in-solapur'>Python
classes in solapur</a>
Python classes in Sangli Python
classes in Sangli
For loop to print multiple variables in Python
We use three functions to print multiple variable values simultaneously using for loop and compare those functions practically with their limitations.
For my studies I have to work with the Tiva-Board TM4C1294XL. I was quite lost when I tried to find examples in the internet. For all the poor souls who have to work with the tiva-board TM4C1294XL, I am going to publish the code I have to write on it. Here is some simple code for a runnig LED-light. If you push the USR1-button, it will change it’s direction.
#include
#include
#include "inc/hw_memmap.h"
#include "inc/hw_types.h"
#include "driverlib/gpio.h"
#include "drivers/pinout.h"
#include "driverlib/pin_map.h"
#include "driverlib/rom.h"
#include "driverlib/rom_map.h"
#include "driverlib/sysctl.h"
#include "inc/tm4c1294ncpdt.h"
void WriteOut(uint8_t bitmask)
{
GPIOPinWrite(GPIO_PORTN_BASE,GPIO_PIN0 |
GPIO_PIN1,0x0);
GPIOPinWrite(GPIO_PORTF_BASE,GPIO_PIN0 |
GPIO_PIN4,0x0);
if(bitmask == 0)
return;
if( (bitmask & 1) || (bitmask & 16) )
{
GPIOPinWrite(GPIO_PORTN_BASE,GPIO_PIN0 |
GPIO_PIN1,0x2);
}
if( (bitmask & 2) || (bitmask & 32) )
{
GPIOPinWrite(GPIO_PORTN_BASE,GPIO_PIN0 |
GPIO_PIN1,0x1);
}
if( (bitmask & 4) || (bitmask & 64) )
{
GPIOPinWrite(GPIO_PORTF_BASE,GPIO_PIN0 |
GPIO_PIN4,0x10);
}
if( (bitmask & ||
(bitmask & 128) )
{
GPIOPinWrite(GPIO_PORTF_BASE,GPIO_PIN0 |
GPIO_PIN4,0x1);
}
}
int
main(void)
{
volatile int delay = 700000;
volatile int direction = 1;
volatile uint8_t runner = 1;
uint32_t config_strength, config_type;
SysCtlPeripheralEnable(SYSCTL_PERIPH_GPION);
SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOF);
SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOJ);
GPIOPinTypeGPIOOutput(GPIO_PORTN_BASE,GPIO_PIN0 |
GPIO_PIN1);
GPIOPinWrite(GPIO_PORTN_BASE,GPIO_PIN0 |
GPIO_PIN1,0x0);
GPIOPinTypeGPIOOutput(GPIO_PORTF_BASE,GPIO_PIN0 |
GPIO_PIN4);
GPIOPinWrite(GPIO_PORTF_BASE,GPIO_PIN0 |
GPIO_PIN4,0x0);
GPIOPinTypeGPIOInput(GPIO_PORTJ_BASE,GPIO_PIN0);
GPIOPadConfigGet(GPIO_PORTJ_BASE,GPIO_PIN0,&config_strength,&config_type);
GPIOPadConfigSet(GPIO_PORTJ_BASE,GPIO_PIN0,config_strength,GPIO_PIN_TYPE_STD_WPU);
if(direction == 1)
runner = 0;
WriteOut(0);
while(1)
{
if(GPIOPinRead(GPIO_PORTJ_BASE,GPIO_PIN0) == 0)
{
if(direction == 0)
direction = 1;
else
richtung = 0;
}
WriteOut(runner);
SysCtlDelay(delay);
if(direction == 0)
{
if(runner == 0)
runner = 1;
else
runner = runner << 1;
}
else
{
if(runner == 0)
runner = 0x8;
else
runner = runner >> 1;
}
}
}
4 messages from 4 displayed.